From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>, Paul Menage <menage@google.com>,
David Rientjes <rientjes@google.com>,
Li Zefan <lizf@cn.fujitsu.com>, Nick Piggin <npiggin@suse.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpuset: current_cpuset_is_being_rebound() need rcu lock
Date: Thu, 11 Mar 2010 18:00:56 -0800 [thread overview]
Message-ID: <20100312020056.GB6389@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100312085807.950B.A69D9226@jp.fujitsu.com>
On Fri, Mar 12, 2010 at 09:03:03AM +0900, KOSAKI Motohiro wrote:
> > On Thu, Mar 11, 2010 at 02:46:15PM +0900, KOSAKI Motohiro wrote:
> > > rcu lockdep detected cpuset have wrong rcu usage.
> > > the fixing is trivial. but I wonder why don't cpuset_being_rebound assignment
> > > and read need a memory barrier pairing?
> >
> > The fix is in -tip, commit 99ee4ca746dda71326db7645463b4075ac1d665c.
> >
> > This is an initialization-time use of rcu_dereference(), so no other
> > task has a reference to this data. Hence it is constant. Other uses
> > of this code operate on shared data structures, which might change at
> > any time.
>
> thanks. I haven't notice such commit.
>
> I think you are talking about task_cs(current) accessing and you are right
> in such point.
> but I'm talking cpuset_being_rebound global variable.
>
> update_tasks_nodemask() has following code
>
> static void update_tasks_nodemask(struct cpuset *cs, const nodemask_t *oldmem,
> struct ptr_heap *heap)
> {
> cpuset_being_rebound = cs; /* start transaction */
> cgroup_scan_tasks(&scan);
> cpuset_being_rebound = NULL; /* end transaction */
> }
Hmmm... What commit are you looking at in what tree? I instead see
a much larger function body for update_tasks_nodemask(). I am looking
in a number of places, including 522dba7134d6b2e5821d3457f7941ec34f668e6d
in Linus's git tree.
Thanx, Paul
next prev parent reply other threads:[~2010-03-12 2:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 5:46 [PATCH] cpuset: current_cpuset_is_being_rebound() need rcu lock KOSAKI Motohiro
2010-03-11 19:08 ` Paul E. McKenney
2010-03-12 0:03 ` KOSAKI Motohiro
2010-03-12 2:00 ` Paul E. McKenney [this message]
2010-03-12 2:14 ` KOSAKI Motohiro
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=20100312020056.GB6389@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=miaox@cn.fujitsu.com \
--cc=npiggin@suse.de \
--cc=rientjes@google.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.