Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-27 Thread Jason Baron
Hi, v3 of this series implements this idea using using a different approach: http://lkml.iu.edu/hypermail/linux/kernel/1502.3/00667.html If that still meets your needs it would be helpful to know in order to move this forward. Looking back at your posting, I was concerned about the test case no

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-25 Thread Jason Baron
On 02/21/2015 07:24 PM, Eric Wong wrote: > Jason Baron wrote: >> On 02/18/2015 12:51 PM, Ingo Molnar wrote: >>> * Ingo Molnar wrote: >>> > [...] However, I think the userspace API change is less > clear since epoll_wait() doesn't currently have an > 'input' events argument as epoll_

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-21 Thread Eric Wong
Jason Baron wrote: > On 02/18/2015 12:51 PM, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > >>> [...] However, I think the userspace API change is less > >>> clear since epoll_wait() doesn't currently have an > >>> 'input' events argument as epoll_ctl() does. > >> ... but the change would be

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Jason Baron
On 02/18/2015 12:51 PM, Ingo Molnar wrote: > * Ingo Molnar wrote: > >>> [...] However, I think the userspace API change is less >>> clear since epoll_wait() doesn't currently have an >>> 'input' events argument as epoll_ctl() does. >> ... but the change would be a bit clearer and somewhat >> mo

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Andy Lutomirski
On Feb 18, 2015 9:38 AM, "Jason Baron" wrote: > > On 02/18/2015 11:33 AM, Ingo Molnar wrote: > > * Jason Baron wrote: > > > >>> This has two main advantages: firstly it solves the > >>> O(N) (micro-)problem, but it also more evenly > >>> distributes events both between task-lists and within > >>>

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Eric Wong
Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > > [...] However, I think the userspace API change is less > > > clear since epoll_wait() doesn't currently have an > > > 'input' events argument as epoll_ctl() does. > > > > ... but the change would be a bit clearer and somewhat > > more fle

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Ingo Molnar
* Ingo Molnar wrote: > > [...] However, I think the userspace API change is less > > clear since epoll_wait() doesn't currently have an > > 'input' events argument as epoll_ctl() does. > > ... but the change would be a bit clearer and somewhat > more flexible: LIFO or FIFO queueing, right? >

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Ingo Molnar
* Jason Baron wrote: > So in the case of multiple threads per epoll set, we > currently add to the head of wakeup queue exclusively in > 'epoll_wait()', and then subsequently remove from the > queue once 'epoll_wait()' returns. So I don't think this > patch addresses balancing on a per epoll

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Jason Baron
On 02/18/2015 11:33 AM, Ingo Molnar wrote: > * Jason Baron wrote: > >>> This has two main advantages: firstly it solves the >>> O(N) (micro-)problem, but it also more evenly >>> distributes events both between task-lists and within >>> epoll groups as tasks as well. >> Its solving 2 issues - sp

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Ingo Molnar
* Jason Baron wrote: > > This has two main advantages: firstly it solves the > > O(N) (micro-)problem, but it also more evenly > > distributes events both between task-lists and within > > epoll groups as tasks as well. > > Its solving 2 issues - spurious wakeups, and more even > loading of

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Jason Baron
On 02/18/2015 03:07 AM, Ingo Molnar wrote: > * Jason Baron wrote: > >> Epoll file descriptors that are added to a shared wakeup >> source are always added in a non-exclusive manner. That >> means that when we have multiple epoll fds attached to a >> shared wakeup source they are all woken up. T

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Ingo Molnar
* Jason Baron wrote: > Epoll file descriptors that are added to a shared wakeup > source are always added in a non-exclusive manner. That > means that when we have multiple epoll fds attached to a > shared wakeup source they are all woken up. This can lead > to excessive cpu usage and uneven

[PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-17 Thread Jason Baron
Epoll file descriptors that are added to a shared wakeup source are always added in a non-exclusive manner. That means that when we have multiple epoll fds attached to a shared wakeup source they are all woken up. This can lead to excessive cpu usage and uneven load distribution. This patch introd