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, jamesclv@us.ibm.com
Subject: Re: BUG_ON(!cpus_equal(cpumask, tmp));
Date: Tue, 30 Mar 2004 17:24:06 -0800 [thread overview]
Message-ID: <273320000.1080696246@flay> (raw)
In-Reply-To: <20040330171104.752104a9.akpm@osdl.org>
--On Tuesday, March 30, 2004 17:11:04 -0800 Andrew Morton <akpm@osdl.org> wrote:
> "Martin J. Bligh" <mbligh@aracnet.com> wrote:
>>
>> I made a similar patch, but I don't see how we can really fix it without
>> providing locking on cpu_online_map.
>
> Are we missing something here?
>
> Why does, for example, smp_send_reschedule() not have the same problem?
> Because we've gone around and correctly removed all references to the CPU
> from the scheduler data structures before offlining it.
>
> But we're not doing that in the mm code, right? Should we not be taking
> mmlist_lock and running around knocking this CPU out of everyone's
> cpu_vm_mask before offlining it?
I think we're assuming that we don't have to because the problem is fixed
by the "cpus_and(tmp, cpumask, cpu_online_map)" in flush_tlb_others so we
don't have to. Except it's racy, and doesn't work.
It would seem to me that your suggestion would fix it. But isn't locking
cpu_online_map both simpler and (most importantly) more generic? I can't
imagine that we don't use this elsewhere ... suppose for instance we took
a timer interrupt, causing a scheduler rebalance, and moved a process to
an offline CPU at that point? Isn't any user of smp_call_function also racy?
Not locking it just seems fundamentally dangerous to me ... maybe I'm
wrong though.
M.
next prev parent reply other threads:[~2004-03-31 1:24 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 [this message]
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=273320000.1080696246@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