Re: fixing deferred reads

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 26 Sep 2008 07:56:55 -0600

On Fri, 2008-09-26 at 17:23 +1200, Amos Jeffries wrote:

> >> Which makes more sense then to cleanup make flushReads() == kickReads(-1),
> >> or similar instead of duplication.
> >
> > Avoiding duplication was not "possible" when the class was written
> > because of the reentrant callbacks and lack of size() accounting in the
> > cbdata list used by the class. The author was, apparently, worried that
> > the reads list will grow as it is being emptied, causing an infinite
> > loop.
>
> I think I remember the kickReads() commit in a fuzzy way. I think it was
> a quick hack to prevent CPU overload and delays on high-performance
> sites when the list was large. Done without full knowlege of the
> deferred reads code, then ported from 2.6 without fixing.
>
> >
> > I think we can merge the two methods now because callbacks can no longer
> > be reentrant. I will add a \todo.
>
> I wasn't criticizing the original design, merely making a point about
> that is now may be easily fixable. The TODO is good if there is no time
> or code-monkey minion to do a patch.

If you think it is now safe to empty the deferred readers list without
counting or making a copy of it, I would be happy to remove duplication.

Cheers,

Alex.
Received on Fri Sep 26 2008 - 13:57:29 MDT

This archive was generated by hypermail 2.2.0 : Sun Sep 28 2008 - 12:00:05 MDT