From: Andrew Morton <akpm@linux-foundation.org>
To: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@suse.de>, Gautham R Shenoy <ego@in.ibm.com>
Subject: Re: Avoid checking for cpu gone when CONFIG_HOTPLUG_CPU not defined
Date: Fri, 6 Apr 2007 23:25:00 -0700 [thread overview]
Message-ID: <20070406232500.3fd84c77.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070406214150.GA3545@linux-os.sc.intel.com>
On Fri, 6 Apr 2007 14:41:50 -0700 "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com> wrote:
> Subject: Avoid checking for cpu gone when CONFIG_HOTPLUG_CPU not defined
>
> Avoid checking for cpu gone in mm hot path when
> CONFIG_HOTPLUG_CPU is not defined.
>
> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
>
> ---
> arch/i386/kernel/smp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: work/arch/i386/kernel/smp.c
> ===================================================================
> --- work.orig/arch/i386/kernel/smp.c
> +++ work/arch/i386/kernel/smp.c
> @@ -365,10 +365,12 @@ static void flush_tlb_others(cpumask_t c
> BUG_ON(cpu_isset(smp_processor_id(), cpumask));
> BUG_ON(!mm);
>
> +#ifdef CONFIG_HOTPLUG_CPU
> /* If a CPU which we ran on has gone down, OK. */
> cpus_and(cpumask, cpumask, cpu_online_map);
> - if (cpus_empty(cpumask))
> + if (unlikely(cpus_empty(cpumask)))
> return;
> +#endif
>
> /*
> * i'm not happy about this global shared spinlock in the
Fair enough.
The code you're touching in with the original CPU-hotplug-for-i386 patches.
x86_64 doesn't do it. It handles tlb flushing differently anyway. But I
suspect that x86_64 is just buggy, unless all callers of flush_tlb_others()
have taken care to disable preemption prior to their calculation of the
passed-in cpumask.
Shudder. Gautham, this is code which we can cheerfully delete when we get
the freezer stuff done. Fortunately, Anil's patch will make it nice and
easy to find again.
next prev parent reply other threads:[~2007-04-07 6:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 21:41 Avoid checking for cpu gone when CONFIG_HOTPLUG_CPU not defined Keshavamurthy, Anil S
2007-04-07 6:25 ` Andrew Morton [this message]
2007-04-09 2:55 ` Gautham R Shenoy
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=20070406232500.3fd84c77.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ak@suse.de \
--cc=anil.s.keshavamurthy@intel.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.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