From: Ingo Molnar <mingo@elte.hu>
To: Gautham R Shenoy <ego@in.ibm.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>,
paulmck@linux.vnet.ibm.com, Dipankar Sarma <dipankar@in.ibm.com>,
laijs@cn.fujitsu.com, Peter Zijlstra <a.p.zijlstra@chello.nl>,
lkml <linux-kernel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: [PATCH] fix rcu vs hotplug race
Date: Tue, 24 Jun 2008 13:01:44 +0200 [thread overview]
Message-ID: <20080624110144.GA8695@elte.hu> (raw)
In-Reply-To: <20080623114941.GB3160@in.ibm.com>
* Gautham R Shenoy <ego@in.ibm.com> wrote:
> > hm, not sure - we might just be fighting the symptom and we might
> > now create a silent resource leak instead. Isnt a full RCU quiescent
> > state forced (on all CPUs) before a CPU is cleared out of
> > cpu_online_map? That way the to-be-offlined CPU should never
> > actually show up in rcp->cpumask.
>
> No, this does not happen currently. The rcp->cpumask is always
> initialized to cpu_online_map&~nohz_cpu_mask when we start a new
> batch. Hence, before the batch ends, if a cpu goes offline we _can_
> have a stale rcp->cpumask, till the RCU subsystem has handled it's
> CPU_DEAD notification.
>
> Thus for a tiny interval, the rcp->cpumask would contain the offlined
> CPU. One of the alternatives is probably to handle this using
> CPU_DYING notifier instead of CPU_DEAD where we can call
> __rcu_offline_cpu().
>
> The warn_on that dhaval was hitting was because of some cpu-offline
> that was called just before we did a local_irq_save inside call_rcu().
> But at that time, the rcp->cpumask was still stale, and hence we ended
> up sending a smp_reschedule() to an offlined cpu. So the check may not
> create any resource leak.
the check may not - but the problem it highlights might and with the
patch we'd end up hiding potential problems in this area.
Paul, what do you think about this mixed CPU hotplug plus RCU workload?
Ingo
next prev parent reply other threads:[~2008-06-24 11:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 10:37 Dhaval Giani
2008-06-23 10:58 ` Ingo Molnar
2008-06-23 11:49 ` Gautham R Shenoy
2008-06-24 11:01 ` Ingo Molnar [this message]
2008-06-26 15:27 ` Paul E. McKenney
2008-06-27 4:47 ` Gautham R Shenoy
2008-06-27 5:18 ` Dipankar Sarma
2008-06-27 5:49 ` Dhaval Giani
2008-06-27 14:58 ` Paul E. McKenney
2008-07-01 5:39 ` Gautham R Shenoy
2008-07-01 6:16 ` Ingo Molnar
2008-07-01 6:28 ` Dhaval Giani
2008-07-01 6:35 ` Ingo Molnar
2008-07-01 6:52 ` Ingo Molnar
2008-07-01 7:48 ` Ingo Molnar
2008-07-01 8:32 ` Ingo Molnar
2008-07-01 19:46 ` Paul E. McKenney
2008-08-01 21:01 ` Paul E. McKenney
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=20080624110144.GA8695@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=dhaval@linux.vnet.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulmck@us.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
Powered by JetHome