[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: SLAP_LIGHTWEIGHT_LISTENER, using lazy_sem is a bad design



At 12:02 AM 10/14/2005, Jong-Hyuk wrote:
>>Is there a particular reason why we monitor write events? I don't see any benefit. Eliminating one set of event sources would reduce our kernel load by half.
>
>I want to ask the same question, too. What was the original rationale behind the listener's waking up the write-wait workers via condition variable 

Given this approach dates to Umich days, we can only guess at
the answer.

One guess would be to reduce the number of active threads.
Note that, with the intro of pools, this still has some
relevancy.  It would be bad to allow N blocked writers
consume all the active threads.  But there are various
other ways of preventing this.

While just having the workers block on write is an option,
I rather avoid letting workers block (on read or write)
as this necessitates relying on large number of threads
to ensure the whole system doesn't block.  Many threading
subsystems do not support well large number of concurrent
threads.

Kurt