[PATCH] s3:events: Call all ready fd event handlers on eachiteration of the main loop
steven.danneman at isilon.com
Tue Jul 6 12:02:51 MDT 2010
> From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE]
> 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
> 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
> 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
> Anybody around knowing for sure?
Thanks for the input. I'd knew you had spent plenty of time thinking
about this code.
I agree your proposal would be a better fix and rescind my patch.
More information about the samba-technical