From: Ashok Raj <ashok.raj@intel.com>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Ashok Raj <ashok.raj@intel.com>, Andi Kleen <ak@muc.de>,
Andrew Morton <akpm@osdl.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch 13/14] x86_64: Use common functions in cluster and physflat mode
Date: Fri, 9 Sep 2005 13:45:03 -0700 [thread overview]
Message-ID: <20050909134503.A29351@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0509091003490.978@montezuma.fsmlabs.com>; from zwane@arm.linux.org.uk on Fri, Sep 09, 2005 at 10:07:28AM -0700
On Fri, Sep 09, 2005 at 10:07:28AM -0700, Zwane Mwaikambo wrote:
> On a slightly different topic, how come we're using physflat for hotplug
> cpu?
>
> -#ifndef CONFIG_CPU_HOTPLUG
> /* In the CPU hotplug case we cannot use broadcast mode
> because that opens a race when a CPU is removed.
> - Stay at physflat mode in this case.
> - It is bad to do this unconditionally though. Once
> - we have ACPI platform support for CPU hotplug
> - we should detect hotplug capablity from ACPI tables and
> - only do this when really needed. -AK */
> + Stay at physflat mode in this case. - AK */
> +#ifdef CONFIG_HOTPLUG_CPU
> if (num_cpus <= 8)
> genapic = &apic_flat;
What you say was true before this patch, (Although now that you point out i
realize the ifdef CONFIG_HOTPLUG_CPU is not required).
Think Andi is fixing this in his next drop to -mm*
When physflat was introduced, it also switched to use physflat mode for
#cpus <=8 when hotplug is enabled, since it doesnt use shortcuts and
so is also safer (although slower).
http://marc.theaimsgroup.com/?l=linux-kernel&m=112317686712929&w=2
The link above made using genapic_flat safer by using the
flat_send_IPI_mask(), and hence i switched back to using
logical flat mode when #cpus <=8, since that a little more efficient than
the send_IPI_mask_sequence() used in physflat mode.
In general we need
flat_mode - #cpus <= 8 (Hotplug defined or not, so we use mask version
for safety)
physflat or cluster_mode when #cpus >8.
If we choose physflat as default for #cpus <=8 (with hotplug) would make
IPI performance worse, since it would do one cpu at a time, and requires 2
writes per cpu for each IPI v.s just 2 for a flat mode mask version of the API.
--
Cheers,
Ashok Raj
- Open Source Technology Center
next prev parent reply other threads:[~2005-09-09 20:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200509032135.j83LZ8gX020554@shell0.pdx.osdl.net>
[not found] ` <20050905231628.GA16476@muc.de>
2005-09-06 23:12 ` [patch 13/14] x86_64: Use common functions in cluster and physflat mode Ashok Raj
2005-09-09 17:07 ` Zwane Mwaikambo
2005-09-09 20:45 ` Ashok Raj [this message]
2005-09-11 16:44 ` Zwane Mwaikambo
2005-09-11 23:02 ` Andi Kleen
2005-09-12 22:23 ` Ashok Raj
2005-09-13 8:10 ` Andi Kleen
2005-09-13 14:53 ` Zwane Mwaikambo
2005-09-13 15:31 ` Andi Kleen
2005-09-10 0:30 ` Andi Kleen
2005-09-10 1:51 ` Zwane Mwaikambo
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=20050909134503.A29351@unix-os.sc.intel.com \
--to=ashok.raj@intel.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@arm.linux.org.uk \
/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