From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Andrew Morton <akpm@osdl.org>
Cc: rddunlap@osdl.org, hari@in.ibm.com, linux-kernel@vger.kernel.org,
apw@shadowen.org, James Cleverdon <jamesclv@us.ibm.com>
Subject: Re: BUG_ON(!cpus_equal(cpumask, tmp));
Date: Tue, 30 Mar 2004 16:57:39 -0800 [thread overview]
Message-ID: <270000000.1080694659@flay> (raw)
In-Reply-To: <20040330163928.7cafae3d.akpm@osdl.org>
>> > I'll just say that kexec fails without this patch and works with
>> > it applied, so I'd like to see it merged. If this patch isn't
>> > acceptable, let's find out why and try to make one that is.
>> >
>> > Thanks for the patch, Hari.
>>
>> > From discussions with Andy, it seems this still has the same race as before
>> just smaller. I don't see how we can fix this properly without having some
>> locking on cpu_online_map .... probably RCU as it's massively read-biased
>> and we don't want to pay a spinlock cost to read it.
>
> We do want to avoid adding stuff to the IPI path.
OK, but my thinking was that the readlock of RCU is free (pretty much).
> If the going-away CPU still responds to IPIs after it has gone away
> then do we actually need to do anything? For x86, at least?
Eeek, you *really* don't want it responding to IPIs after it's been shut
down. It's dead, dead, dead, and we don't want it rolling over in it's
gasping throes, and stabbing us in the back. Supposing we've kexeced or
otherwise rebooted the machine? If we've shut down the other cpus, we
should be able to reprogram the IDT, drop back out of paging mode to
reboot into the BIOS, or basically anything. Nothing short of an NMI or
a power cycle (aka Startup / INIT sequence) should arouse it.
And if we don't take IPIs, I really think we're playing russian roulette
here ... I was under the *impression* that if you sent an IPI to a cpu
that was down and didn't ack it, we'd hang. Forever. At least on a P3
style apic bus, when we're sending individual interrupts to each CPU,
not broadcast.
I made a similar patch, but I don't see how we can really fix it without
providing locking on cpu_online_map. Or else you have to do something
gross like mark the CPU offline, spin for 5 seconds, then take it offline.
Ick. Maybe we could be smart with a 2-stage commit with 2 bitmaps or
something, but I think that basically evolves into RCU anyway, and just
reimplements it ;-(
Shared global data needs some form of locking, even if "oh we don't
write to that very often, I think we'll get away with it" ;-)
M.
next prev parent reply other threads:[~2004-03-31 0:59 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 [this message]
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
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=270000000.1080694659@flay \
--to=mbligh@aracnet.com \
--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=rddunlap@osdl.org \
/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