From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, xmu@redhiat.com,
viro@zeniv.linux.org.uk, soheil@google.com,
jacob.e.keller@intel.com, ebiggers@kernel.org,
cmaiolino@redhat.com, brauner@kernel.org, axboe@kernel.dk,
pabeni@redhat.com, akpm@linux-foundation.org
Subject: + epoll-use-refcount-to-reduce-ep_mutex-contention-v5.patch added to mm-nonmm-unstable branch
Date: Wed, 08 Mar 2023 13:59:04 -0800 [thread overview]
Message-ID: <20230308215904.D6433C433D2@smtp.kernel.org> (raw)
The patch titled
Subject: epoll-use-refcount-to-reduce-ep_mutex-contention-v5
has been added to the -mm mm-nonmm-unstable branch. Its filename is
epoll-use-refcount-to-reduce-ep_mutex-contention-v5.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/epoll-use-refcount-to-reduce-ep_mutex-contention-v5.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Paolo Abeni <pabeni@redhat.com>
Subject: epoll-use-refcount-to-reduce-ep_mutex-contention-v5
Date: Wed, 8 Mar 2023 22:51:31 +0100
update some comments
Link: https://lkml.kernel.org/r/323de732635cc3513c1837c6cbb98f012174f994.1678312201.git.pabeni@redhat.com
Tested-by: Xiumei Mu <xmu@redhiat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Carlos Maiolino <cmaiolino@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/fs/eventpoll.c~epoll-use-refcount-to-reduce-ep_mutex-contention-v5
+++ a/fs/eventpoll.c
@@ -714,6 +714,8 @@ static void ep_free(struct eventpoll *ep
* Removes a "struct epitem" from the eventpoll RB tree and deallocates
* all the associated resources. Must be called with "mtx" held.
* If the dying flag is set, do the removal only if force is true.
+ * This prevents ep_clear_and_put() from dropping all the ep references
+ * while running concurrently with eventpoll_release_file().
* Returns true if the eventpoll can be disposed.
*/
static bool __ep_remove(struct eventpoll *ep, struct epitem *epi, bool force)
@@ -941,14 +943,13 @@ void eventpoll_release_file(struct file
bool dispose;
/*
- * Use the 'dying' flag to prevent a concurrent ep_cleat_and_put() from
+ * Use the 'dying' flag to prevent a concurrent ep_clear_and_put() from
* touching the epitems list before eventpoll_release_file() can access
* the ep->mtx.
*/
again:
spin_lock(&file->f_lock);
if (file->f_ep && file->f_ep->first) {
- /* detach from ep tree */
epi = hlist_entry(file->f_ep->first, struct epitem, fllink);
epi->dying = true;
spin_unlock(&file->f_lock);
_
Patches currently in -mm which might be from pabeni@redhat.com are
epoll-use-refcount-to-reduce-ep_mutex-contention.patch
epoll-use-refcount-to-reduce-ep_mutex-contention-v5.patch
reply other threads:[~2023-03-08 21:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230308215904.D6433C433D2@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=cmaiolino@redhat.com \
--cc=ebiggers@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xmu@redhiat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.