linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add epoll round robin wakeup mode
@ 2015-02-17 19:33 Jason Baron
  2015-02-17 19:33 ` [PATCH v2 1/2] sched/wait: add " Jason Baron
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Jason Baron @ 2015-02-17 19:33 UTC (permalink / raw)
  To: peterz, mingo, viro
  Cc: akpm, normalperson, davidel, mtk.manpages, linux-kernel,
	linux-fsdevel, linux-api

When we are sharing a wakeup source among multiple epoll fds, we end up with
thundering herd wakeups, since there is currently no way to add to the
wakeup source exclusively. This series introduces 2 new epoll flags,
EPOLLEXCLUSIVE for adding to a wakeup source exclusively. And EPOLLROUNDROBIN
which is to be used in conjunction to EPOLLEXCLUSIVE to evenly
distribute the wakeups. This patch was originally motivated by a desire to
improve wakeup balance and cpu usage for a listen socket() shared amongst
multiple epoll fd sets.

See: http://lwn.net/Articles/632590/ for previous test program and testing
resutls.

Epoll manpage text:

EPOLLEXCLUSIVE
        Provides exclusive wakeups when attaching multiple epoll fds to a
        shared wakeup source. Must be specified with an EPOLL_CTL_ADD operation.

EPOLLROUNDROBIN
        Provides balancing for exclusive wakeups when attaching multiple epoll
        fds to a shared wakeup soruce. Depends on EPOLLEXCLUSIVE being set and
        must be specified with an EPOLL_CTL_ADD operation.

Thanks,

-Jason


Jason Baron (2):
  sched/wait: add round robin wakeup mode
  epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

 fs/eventpoll.c                 | 25 ++++++++++++++++++++-----
 include/linux/wait.h           | 11 +++++++++++
 include/uapi/linux/eventpoll.h |  6 ++++++
 kernel/sched/wait.c            | 10 ++++++++--
 4 files changed, 45 insertions(+), 7 deletions(-)

-- 
1.8.2.rc2

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-02-27 22:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-17 19:33 [PATCH v2 0/2] Add epoll round robin wakeup mode Jason Baron
2015-02-17 19:33 ` [PATCH v2 1/2] sched/wait: add " Jason Baron
2015-02-17 19:33 ` [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN Jason Baron
     [not found]   ` <7956874bfdc7403f37afe8a75e50c24221039bd2.1424200151.git.jbaron-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-02-18  8:07     ` Ingo Molnar
     [not found]       ` <20150218080740.GA10199-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-18 15:42         ` Jason Baron
2015-02-18 16:33           ` Ingo Molnar
2015-02-18 17:38             ` Jason Baron
     [not found]               ` <54E4CE14.5010708-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-02-18 17:45                 ` Ingo Molnar
2015-02-18 17:51                   ` Ingo Molnar
     [not found]                     ` <20150218175123.GA31878-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-18 22:18                       ` Eric Wong
2015-02-19  3:26                     ` Jason Baron
2015-02-22  0:24                       ` Eric Wong
     [not found]                         ` <20150222002432.GA9031-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2015-02-25 15:48                           ` Jason Baron
2015-02-18 23:12               ` Andy Lutomirski
     [not found]   ` <CAPh34mcPNQELwZCDTHej+HK=bpWgJ=jb1LeCtKoUHVgoDJOJoQ@mail.gmail.com>
     [not found]     ` <CAPh34mcPNQELwZCDTHej+HK=bpWgJ=jb1LeCtKoUHVgoDJOJoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-27 22:24       ` Jason Baron
2015-02-17 19:46 ` [PATCH v2 0/2] Add epoll round robin wakeup mode Andy Lutomirski
2015-02-17 20:33   ` Jason Baron
     [not found]     ` <54E3A591.2050806-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-02-17 21:09       ` Andy Lutomirski
     [not found]         ` <CALCETrWg9sdyoKg0-BkwKQgyANvJybQ_wqjTfvYEGW1+S1J5Bw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-18  3:15           ` Jason Baron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).