From: Jason Baron <jbaron@akamai.com>
To: akpm@linux-foundation.org, famz@redhat.com
Cc: normalperson@yhbt.net, nzimmer@sgi.com, viro@zeniv.linux.org.uk,
davidel@xmailserver.org, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [RFC PATCH 0/5] Remove global locks from epoll
Date: Thu, 15 Jan 2015 21:02:27 +0000 (GMT) [thread overview]
Message-ID: <cover.1421337657.git.jbaron@akamai.com> (raw)
Hi,
There are a number of 'global' locks taken in epoll. The first two patches
remove taking these in the poll() and wakeup paths, since we're already
preventing loops, and excessive wakeup paths during EPOLL_CTL_ADD. The
final 3 introduce the idea of breaking up the current global 'epmutex' by
keeping track of the files that make up a connected epoll set. In this way
we can limit locking to be within in a connected component as opposed to
the current design which limits things globally. This will mostly help
workloads that are doing deeper than 1 level epoll nesting (which may
that be that common), since we currently don't take the 'epmutex' for
EPOLL_CTL_ADD when there is only 1 level of nesting. However, we do eliminate
the global 'epmutex' from the close() path. There is more detail on this
in the patch descriptions.
One aspect that I'd like to improve is that these patches add a 'struct
list_head' and a pointer to the 'struct file', so essentially 3 pointers. I
think there are ways to reduce this (for example, by using single-link
lists where approriate), but I wanted to get general feedback on the approach
before attempting this.
Previous changes in this area showed really good improvements on SPECjbb,
see commit: 67347fe4e6326338ee217d7eb826bedf30b2e155. However, I don't think
that this patch series will improve things that much, as its mostly going
to help deeper epoll nesting setups. The motivation for these patches was that
it was bothering me that we were still taking some global locks in some
fairly hot paths (namely close()).
Patches are fairly lightly tested at this point (and need a lot more testing),
but I'm not aware of any outstanding issues.
Finally, I'd also like to potentially co-ordinate this series with the recent
syscall enhancements from Fam Zheng: http://lwn.net/Articles/628828/ since these
patches are somewhat invasive.
Thanks,
-Jason
Jason Baron (5):
epoll: Remove ep_call_nested() from ep_eventpoll_poll()
epoll: Remove ep_call_nested() from ep_poll_safewake()
epoll: Add ep_call_nested_nolock()
epoll: Allow topology checks to be parallelized
epoll: Introduce epoll connected components (remove the epmutex)
fs/eventpoll.c | 596 +++++++++++++++++++++++++++++++---------------
include/linux/eventpoll.h | 52 ++--
include/linux/fs.h | 3 +
3 files changed, 442 insertions(+), 209 deletions(-)
--
1.8.2.rc2
next reply other threads:[~2015-01-15 21:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 21:02 Jason Baron [this message]
2015-01-15 21:02 ` [RFC PATCH 1/5] epoll: remove ep_call_nested() from ep_eventpoll_poll() Jason Baron
2015-01-15 21:02 ` [RFC PATCH 2/5] epoll: remove ep_call_nested() from ep_poll_safewake() Jason Baron
2015-01-15 21:02 ` [RFC PATCH 3/5] epoll: add ep_call_nested_nolock() Jason Baron
2015-01-15 21:02 ` [RFC PATCH 4/5] epoll: Allow topology checks to be parallelized Jason Baron
2015-01-15 21:02 ` [RFC PATCH 5/5] epoll: introduce epoll connected components (remove the epmutex) Jason Baron
2015-01-15 23:10 ` Eric Wong
2015-01-16 17:03 ` Jason Baron
2015-01-16 1:36 ` [RFC PATCH 0/5] Remove global locks from epoll Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1421337657.git.jbaron@akamai.com \
--to=jbaron@akamai.com \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=famz@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=nzimmer@sgi.com \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).