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

Ingo Molnar
2015-02-18T17:45:40Z

* Jason Baron <jbaron@akamai.com> 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 set basis.

Okay, so I was confused about how the code works.

> I think we could address the case you describe by simply
> doing __add_wait_queue_tail_exclusive() instead of
> __add_wait_queue_exclusive() in epoll_wait(). [...]

Yes.

> [...] 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?

But having the queueing model as part of the epoll context
is a legitimate approach as well.

Thanks,

Ingo