[Date Prev][Date Next]
Re: revised lightweight dispatcher
Kurt D. Zeilenga wrote:
I've committed a revised lightweight dispatcher.
Aside from various cleanups (no suspend flags),
the main difference is writers are now spun out
into separate threads. Also, readers now spawn
operation threads instead of performing the
operation itself. This is to reduce the clear
read flag handling.
Initial tests show this revision performs
I see it still uses the lazy semaphore code, so the listener thread can
still be blocked and prevented from runnning the idletimeout checker.
The looping problem I referred to earlier appears to have been
minimized. I still see one or two extra wakeups on the read event, but
it doesn't seem to be a runaway condition any more.
Obviously there is still a race condition between the time the listener
kicks off the read/write handler and when it goes back to select/epoll.
If the handler hasn't performed enough I/O on the descriptor yet, the
event will fire again.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/