From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu, dipankar@in.ibm.com,
rusty@au1.ibm.com, bmark@us.ibm.com
Subject: Re: [RFC,PATCH] Use RCU to protect tasklist for unicast signals
Date: Thu, 11 Aug 2005 10:56:54 -0700 [thread overview]
Message-ID: <20050811175654.GH1300@us.ibm.com> (raw)
In-Reply-To: <20050811171451.GA5108@infradead.org>
On Thu, Aug 11, 2005 at 06:14:51PM +0100, Christoph Hellwig wrote:
> On Wed, Aug 10, 2005 at 10:11:45AM -0700, Paul E. McKenney wrote:
> > Hello!
> >
> > This patch is an experiment in use of RCU for individual code paths that
> > read-acquire the tasklist lock, in this case, unicast signal delivery.
> > It passes five kernbenches on 4-CPU x86, but obviously needs much more
> > testing before it is considered for serious use, let alone inclusion.
>
> I think we should switch over tasklist_lock to RCU completely instead of
> adding suck hacks. I've started lots of preparation work to get rid of
> tasklist_lock users outside of kernel/, especialy getting rid of any
> use in modules.
I agree fully with your end goal -- I would certainly look funny
disagreeing, right? ;-) And Oleg pointed out an area I missed in my
patch, am fixing, but in the meantime it most certainly does qualify as
a suck hack. :-/ Working on it...
But one of the cool things about RCU is that we can make this change
incrementally, with a series of small patches. We can have some of
the read paths protected by RCU and others continuing to be protected
by read_lock(), so that we can avoid the need for a "flag day" that
hits all 300+ uses of tasklist_lock.
FWIW, the approach that I am taking to fix the bug Oleg and Christoph
spotted is roughly as follows:
o Add "struct rcu_head rcu", "struct sighand_struct *successor",
and "int deleted" to struct sighand_struct. This allows
reliable signal delivery in face of sighand_struct replacements.
If an RCU reader finds (deleted && !successor), that reader
is trying to signal a dying process, so gives up. If an
RCU reader instead finds (deleted && successor), the reader
traverses the successor pointer to find the current version.
o Apply call_rcu() to deletion of struct sighand_struct, with
the exception of a couple of failure paths in exec.c, where
the sighand_struct was never exposed to RCU readers.
Thoughts?
Thanx, Paul
next prev parent reply other threads:[~2005-08-11 17:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-10 17:11 [RFC,PATCH] Use RCU to protect tasklist for unicast signals Paul E. McKenney
2005-08-11 9:56 ` Ingo Molnar
2005-08-11 14:14 ` Paul E. McKenney
2005-08-12 2:00 ` Lee Revell
2005-08-12 6:36 ` Ingo Molnar
2005-08-12 20:57 ` Paul E. McKenney
2005-08-11 17:14 ` Christoph Hellwig
2005-08-11 17:56 ` Paul E. McKenney [this message]
2005-08-11 18:00 ` Dipankar Sarma
2005-08-11 18:12 ` Dipankar Sarma
-- strict thread matches above, loose matches on Subject: below --
2005-08-11 12:16 Oleg Nesterov
2005-08-11 15:20 ` Paul E. McKenney
2005-08-12 1:56 ` Paul E. McKenney
2005-08-12 8:51 ` Oleg Nesterov
2005-08-12 15:42 ` Paul E. McKenney
2005-08-15 17:44 ` Paul E. McKenney
2005-08-16 8:14 ` Ingo Molnar
2005-08-16 11:56 ` Oleg Nesterov
2005-08-16 17:07 ` Paul E. McKenney
2005-08-17 1:48 ` Paul E. McKenney
2005-08-17 6:35 ` Ingo Molnar
2005-08-17 14:35 ` Oleg Nesterov
2005-08-17 21:19 ` Paul E. McKenney
2005-08-18 11:48 ` Oleg Nesterov
2005-08-19 1:29 ` Paul E. McKenney
2005-08-19 13:27 ` Oleg Nesterov
2005-08-19 18:34 ` Paul E. McKenney
2005-08-18 12:24 ` Oleg Nesterov
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=20050811175654.GH1300@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=bmark@us.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@au1.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox