Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Junchang(Jason) Wang
Hi all, The alternate patch from Eric works well too. Even though I didn't see a performance boost compared with the old version, this one is clearer to me. Thanks your guys. Cheers! --Jason On Tue, Jan 1, 2013 at 5:53 PM, Linus Torvalds wrote: > On Tue, Jan 1, 2013 at 1:17 PM, Eric Wong

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Linus Torvalds
On Tue, Jan 1, 2013 at 1:17 PM, Eric Wong wrote: >> >> An alternate version (limited to epoll) would be: >> >> diff --git a/fs/eventpoll.c b/fs/eventpoll.c >> index cd96649..ca5f3d0 100644 >> --- a/fs/eventpoll.c >> +++ b/fs/eventpoll.c >> @@ -1299,6 +1299,7 @@ static int ep_modify(struct

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Wong
Eric Wong wrote: > Eric Dumazet wrote: > > commit 626cf236608505d376e4799adb4f7eb00a8594af should not have this > > side effect, at least for poll()/select() functions. The epoll() changes > > I am not yet very confident. > > I have a better explanation of the epoll problem below. > > An

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Wong
Eric Dumazet wrote: > On Mon, 2012-12-31 at 13:21 +, Eric Wong wrote: > > This patch seems to fix my issue with ppoll() being stuck on my > > SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 > > > > The change to sock_poll_wait() in > > commit

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Dumazet
On Mon, 2012-12-31 at 13:21 +, Eric Wong wrote: > This patch seems to fix my issue with ppoll() being stuck on my > SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 > > The change to sock_poll_wait() in > commit 626cf236608505d376e4799adb4f7eb00a8594af > (poll: add

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Junchang(Jason) Wang
Hi Eric and list, Thanks a lot. The patch solves our (Andreas and my) issue in using epoll. Here's our test program https://github.com/AndreasVoellmy/epollbug/blob/master/epollbug.c We are using Linux 3.7.1 and a server with 80 cores. Cheers! --Jason On Mon, Dec 31, 2012 at 6:24 PM, Eric Wong

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Junchang(Jason) Wang
Hi Eric and list, Thanks a lot. The patch solves our (Andreas and my) issue in using epoll. Here's our test program https://github.com/AndreasVoellmy/epollbug/blob/master/epollbug.c We are using Linux 3.7.1 and a server with 80 cores. Cheers! --Jason On Mon, Dec 31, 2012 at 6:24 PM, Eric Wong

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Dumazet
On Mon, 2012-12-31 at 13:21 +, Eric Wong wrote: This patch seems to fix my issue with ppoll() being stuck on my SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 The change to sock_poll_wait() in commit 626cf236608505d376e4799adb4f7eb00a8594af (poll: add

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Wong
Eric Dumazet eric.duma...@gmail.com wrote: On Mon, 2012-12-31 at 13:21 +, Eric Wong wrote: This patch seems to fix my issue with ppoll() being stuck on my SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 The change to sock_poll_wait() in commit

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Eric Wong
Eric Wong normalper...@yhbt.net wrote: Eric Dumazet eric.duma...@gmail.com wrote: commit 626cf236608505d376e4799adb4f7eb00a8594af should not have this side effect, at least for poll()/select() functions. The epoll() changes I am not yet very confident. I have a better explanation of the

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Linus Torvalds
On Tue, Jan 1, 2013 at 1:17 PM, Eric Wong normalper...@yhbt.net wrote: An alternate version (limited to epoll) would be: diff --git a/fs/eventpoll.c b/fs/eventpoll.c index cd96649..ca5f3d0 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1299,6 +1299,7 @@ static int ep_modify(struct

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2013-01-01 Thread Junchang(Jason) Wang
Hi all, The alternate patch from Eric works well too. Even though I didn't see a performance boost compared with the old version, this one is clearer to me. Thanks your guys. Cheers! --Jason On Tue, Jan 1, 2013 at 5:53 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Tue, Jan 1,

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2012-12-31 Thread Eric Wong
Eric Wong wrote: > This patch seems to fix my issue with ppoll() being stuck on my > SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 OK, it doesn't fix my issue, but it seems to make it harder-to-hit... > The change to sock_poll_wait() in > commit

[PATCH] poll: prevent missed events if _qproc is NULL

2012-12-31 Thread Eric Wong
This patch seems to fix my issue with ppoll() being stuck on my SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 The change to sock_poll_wait() in commit 626cf236608505d376e4799adb4f7eb00a8594af (poll: add poll_requested_events() and poll_does_not_wait() functions) seems to

[PATCH] poll: prevent missed events if _qproc is NULL

2012-12-31 Thread Eric Wong
This patch seems to fix my issue with ppoll() being stuck on my SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 The change to sock_poll_wait() in commit 626cf236608505d376e4799adb4f7eb00a8594af (poll: add poll_requested_events() and poll_does_not_wait() functions) seems to

Re: [PATCH] poll: prevent missed events if _qproc is NULL

2012-12-31 Thread Eric Wong
Eric Wong normalper...@yhbt.net wrote: This patch seems to fix my issue with ppoll() being stuck on my SMP machine: http://article.gmane.org/gmane.linux.file-systems/70414 OK, it doesn't fix my issue, but it seems to make it harder-to-hit... The change to sock_poll_wait() in commit