Messages in this thread | | | Date | Thu, 29 Jan 2009 23:41:53 -0800 (PST) | From | Davide Libenzi <> | Subject | Re: [patch 1/2] epoll fix own poll() |
| |
On Fri, 30 Jan 2009, Pavel Pisa wrote:
> epoll_wait() unconditionally calls ep_poll(), the "rdllist" is not empty > (cheked by previous ep_eventpoll_poll() call), so ep_send_events() > has to be called. It moves all events from "rdllist" onto "txlist" > and reports events confirmed by individual poll() calls to user. > There could be non signaling events in the "rdlist" left there from > previous scan for level triggering events or in case, that condition > is reset by some other intervention before ep_eventpoll_poll(). > All this is not problem yet, it would result in one abundant call to > epoll_wait() which returns 0. No problem. The EPOLLET events > are moved from "rdlist", others (level triggered events) signalling > are queued on "rdlist" again. If userspace does its duty, they would > be removed during next call. This all seems to suggests, that one > abundant epoll_wait() would get things back on the right path. > All critical processing (moving between lists) seems to be under > held of spinlock, so possibility for bugs is low. I have not yet analyzed > overflow list which complicates things. > > I am not clever enough, to see, where is the problem, that situation > is not stabilized. Can you teach me Davide, please?
Sorry, I missed part of the email. Yes, if revents is zero in the send-lood, I don't see how files can be added back to the ready-list. Please, create a very small test program that exhibit such behaviour ...
- Davide
| |