From: Matthew Wilcox <firstname.lastname@example.org>
To: "Eric W. Biederman" <email@example.com>
Cc: Stephen Brennan <firstname.lastname@example.org>,
Alexey Dobriyan <email@example.com>,
James Morris <firstname.lastname@example.org>,
"Serge E. Hallyn" <email@example.com>,
Paul Moore <firstname.lastname@example.org>,
Stephen Smalley <email@example.com>,
Eric Paris <firstname.lastname@example.org>,
email@example.com, Casey Schaufler <firstname.lastname@example.org>,
Alexander Viro <email@example.com>,
Subject: Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU
Date: Sun, 13 Dec 2020 16:32:34 +0000 [thread overview]
Message-ID: <20201213163234.GH2443@casper.infradead.org> (raw)
On Sun, Dec 13, 2020 at 08:30:40AM -0600, Eric W. Biederman wrote:
> Stephen Brennan <firstname.lastname@example.org> writes:
> > The pid_revalidate() function requires dropping from RCU into REF lookup
> > mode. When many threads are resolving paths within /proc in parallel,
> > this can result in heavy spinlock contention as each thread tries to
> > grab a reference to the /proc dentry lock (and drop it shortly
> > thereafter).
> I am feeling dense at the moment. Which lock specifically are you
> referring to? The only locks I can thinking of are sleeping locks,
> not spinlocks.
Stephen may have a better answer than this, but our mutex implementation
spins if the owner is still running, so he may have misspoken slightly.
He's testing on a giant system with hundreds of CPUs, so a mutex is
going to behave like a spinlock for him.
> Why do we need to test flags here at all?
> Why can't the code simply take an rcu_read_lock unconditionally and just
> pass flags into do_pid_update_inode?
Hah! I was thinking about that possibility this morning, and I was
going to ask you that question.
next prev parent reply other threads:[~2020-12-13 16:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 0:02 [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU Stephen Brennan
2020-12-12 20:55 ` Matthew Wilcox
2020-12-13 14:22 ` Eric W. Biederman
2020-12-13 16:29 ` Matthew Wilcox
2020-12-13 23:00 ` Paul Moore
2020-12-15 18:09 ` Casey Schaufler
2020-12-15 22:04 ` Eric W. Biederman
2020-12-15 22:53 ` Casey Schaufler
2020-12-16 1:05 ` Stephen Brennan
2020-12-14 18:45 ` Casey Schaufler
2020-12-14 18:15 ` Stephen Brennan
2020-12-13 14:30 ` Eric W. Biederman
2020-12-13 16:32 ` Matthew Wilcox [this message]
2020-12-14 17:19 ` Stephen Brennan
2020-12-15 21:45 ` Eric W. Biederman
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).