Messages in this thread | | | Date | Fri, 30 Jan 2009 10:40:51 -0800 (PST) | From | Davide Libenzi <> | Subject | Re: [patch 1/2] epoll fix own poll() |
| |
On Fri, 30 Jan 2009, Pavel Pisa wrote:
> I have seen the reason exactly when I have sent the e-mail > and switched computer off at the night. > > The reason is simple and it is caused by debugging print in each > loop in my application and by way how poll concept is implemented > in the kernel.
Yes, this is a known thing. Like I already told you yesterday, calling it a "spurious" event. So you code *is* generating a spurios event to the tty, with a write. Unfortunately this is how Linux poll subsystem works. But things can be improved, w/out any revolution. I already have patches to send Andrew-ward, that (gradually) uses the wakeup "key" to report event that really happened, during the wakeup call. This will allow the epoll callback to avoid epoll waiters wakeups, when events do not match the interest mask.
- Davide
| |