From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Andy Whitcroft <apw@shadowen.org>
Cc: vatsa@in.ibm.com, mbligh@aracnet.com, hari@in.ibm.com,
akpm@osdl.org, linux-kernel@vger.kernel.org, jamesclv@us.ibm.com
Subject: Re: BUG_ON(!cpus_equal(cpumask, tmp));
Date: Fri, 2 Apr 2004 10:33:27 -0800 [thread overview]
Message-ID: <20040402103327.5ebc1956.rddunlap@osdl.org> (raw)
In-Reply-To: <7621629.1080823120@42.150.104.212.access.eclipse.net.uk>
On Thu, 01 Apr 2004 12:38:40 +0100 Andy Whitcroft wrote:
| --On 01 April 2004 10:34 +0530 Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
|
| > Hmm ..Doesn't it need to drop tlbstate_lock before returning?
| > The second lock should be call_lock?
|
| Yes and Yes. I don't know how Andrew copes with 300 odd patches.
| I don't seem to be able to keep track of the versions on 3 of them?
| Seems I sent out an old version. Doh. Explicit version numbers
| from now on.
|
| Below is tested version of the patch. If anyone can reproduce the
| issue I would be interested in knowing if this passes a reboot on
| that system.
|
| Apologies for the confusion. And thanks for reviewing!
This version works well, thank you. Without it I still see the
BUG_ON() in smp.c (line 359).
I noted a few comments corrections and style changes below.
Want a patch for them instead?
| @@ -367,16 +365,24 @@ static void flush_tlb_others(cpumask_t c
| * detected by the NMI watchdog.
| */
| spin_lock(&tlbstate_lock);
| +
| + /* Subtle, mask the request mask with the currently online cpu's.
| + * Sample this under the lock; cpus in the the middle of going
x.x
| + * offline will wait until there is noone in this critical section
| + * before disabling IPI handling. */
| + cpus_and(tmp, cpumask, cpu_online_map);
| + if(cpus_empty(tmp))
if (cpus_empty(tmp))
| + goto out_unlock;
| @@ -527,6 +531,15 @@ int smp_call_function (void (*func) (voi
| atomic_set(&data.finished, 0);
|
| spin_lock(&call_lock);
| +
| + /* Subtle, get the current number of online cpus.
| + * Sample this under the lock; cpus in the the middle of going
x.x
| + * offline will wait until there is noone in this critical section
| + * before disabling IPI handling. */
| @@ -551,6 +565,20 @@ static void stop_this_cpu (void * dummy)
| * Remove this CPU:
| */
| cpu_clear(smp_processor_id(), cpu_online_map);
| +
| + /* Subtle, IPI users assume that they will be able to get IPI's
| + * though to the cpus listed in cpu_online_map. To ensure this
through
| + * we add the requirement that they check cpu_online_map within
| + * the IPI critical sections. Here we remove ourselves from the
| + * map, then ensure that all other cpus have left the relevant
| + * critical sections since the change. We do this by aquiring
acquiring
| + * the relevant section locks, if we have them none else is in
noone
| + * them. Once this is done we can go offline. */
--
~Randy
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)
next prev parent reply other threads:[~2004-04-02 18:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 15:39 BUG_ON(!cpus_equal(cpumask, tmp)); Martin J. Bligh
2004-03-30 0:21 ` Andrew Morton
2004-03-30 0:25 ` Andrew Morton
2004-03-30 13:28 ` Hariprasad Nellitheertha
2004-03-30 23:17 ` Randy.Dunlap
2004-03-31 0:22 ` Martin J. Bligh
2004-03-31 0:39 ` Andrew Morton
2004-03-31 0:57 ` Martin J. Bligh
2004-03-31 1:11 ` Andrew Morton
2004-03-31 1:24 ` Martin J. Bligh
2004-03-31 1:36 ` Andrew Morton
2004-03-31 1:51 ` Martin J. Bligh
2004-03-31 4:43 ` Hariprasad Nellitheertha
2004-04-01 0:31 ` Andy Whitcroft
2004-04-01 5:04 ` Srivatsa Vaddagiri
2004-04-01 11:38 ` Andy Whitcroft
2004-04-02 18:33 ` Randy.Dunlap [this message]
2004-04-01 8:42 ` Paul Jackson
2004-04-01 13:57 ` Hariprasad Nellitheertha
2004-04-03 1:45 ` Andy Whitcroft
2004-03-31 1:01 ` Andy Whitcroft
-- strict thread matches above, loose matches on Subject: below --
2004-01-02 23:51 Martin J. Bligh
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=20040402103327.5ebc1956.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=hari@in.ibm.com \
--cc=jamesclv@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=vatsa@in.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