Re: [PATCH] Check half-closed descriptors at most once per second.

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 25 Sep 2008 11:32:55 -0600

On Thu, 2008-09-25 at 14:08 +0800, Adrian Chadd wrote:
> 2008/9/25 Alex Rousskov <rousskov_at_measurement-factory.com>:
>
> > This revision resurrects 1 check/sec limit, but hopefully with fewer
> > bugs. In my limited tests, CPU usage seems to be back to normal.
>
> Woo, thanks!

Committed.

> > The DescriptorSet class has O(1) complexity for search, insertion,
> > and deletion. It uses about 2*sizeof(int)*MaxFD bytes. Splay tree that
> > used to store half-closed descriptors previously uses less RAM for small
> > number of descriptors but has O(log n) complexity.
> >
> > The DescriptorSet code should probably get its own .h and .cc files,
> > especially if it is going to be used by deferred reads.
>
> Could you do that sooner rather than later? I'd like to try using this
> code for deferred reads and delay pools.

Done. See src/DescriptorSet.{cc,h}

Alex.
Received on Thu Sep 25 2008 - 17:33:05 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 26 2008 - 12:00:05 MDT