[PATCH] s3:events: Call all ready fd event handlers on each iteration of the main loop
Volker.Lendecke at SerNet.DE
Tue Jul 6 03:05:24 MDT 2010
On Mon, Jul 05, 2010 at 06:01:17PM -0700, Steven Danneman wrote:
> Attached is a proposed patch to make the main message loop in S3 more
> fair to fd based events. Currently, network traffic can starve out all
> other fd based events. We hit this at Isilon with our fd based oplock
> upcalls, but this issue should also affect iNotify on Linux and oplocks
> on Irix.
> As this is a major change to the server I wanted to pass it by the list
Sorry, but I think this is the wrong fix. We deliberately
only handle one single event in run_events. The reason is
that while handling events the state of other pending events
can change. This has caused us big pain in the past.
Yes, this is indeed a problem that I had to badly work
around with d5cf648, but the fix needs to look a bit
differently I think. We need to remove a file descriptor off
the list of interested fd's whenever it is being handled.
When either no fd's are left or in a select call nobody is
active, we need to push all ones on the list again. This
should give us round-robin handling of fds.
I am not sure if only select is affected. It might be the
case that Linux under epoll is already fair in the sense
that it never starves sockets.
Anybody around knowing for sure?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the samba-technical