All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Matthew Wilcox <matthew@wil.cx>, Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-acpi@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: [PATCH 01/14] Introduce cpu_enabled_map and friends
Date: Tue, 15 Jul 2008 19:11:42 -0600	[thread overview]
Message-ID: <20080716011142.GI10919@ldl.fc.hp.com> (raw)
In-Reply-To: <20080715184822.GB29991@flint.arm.linux.org.uk>

* Russell King <rmk+lkml@arm.linux.org.uk>:
> On Tue, Jul 15, 2008 at 12:16:32PM -0600, Matthew Wilcox wrote:
> > On Tue, Jul 15, 2008 at 11:57:40AM -0600, Alex Chiang wrote:
> > > My thought was that big SMP systems like ia64, possibly sparc and
> > > ppc, and increasingly, x86, might find something like this
> > > useful, as systems get larger and larger, and vendors are going
> > > to want to do RAS-ish features, like the ability to keep CPUs in
> > > firmware across reboots until told otherwise by the sysadmin.
> > > 
> > > Right now, a 'present' CPU strongly implies 'online' as well,
> > > since we're calling cpu_up() for all 'present' CPUs in
> > > smp_init(). But this hurts if:
> > > 
> > > 	- you don't actually want to bring up all 'present' CPUs
> > > 	- you still want to interact with these weirdo zombie
> > > 	  CPUs that are 'present' but not 'online'
> > 
> > Have you considered simply failing __cpu_up() for CPUs that are
> > deconfigured by firmware?
> 
> But what if you want to have a system boot with, say, 4 CPUs and
> then decide at run time to bring up another 4 CPUs when required?
> 
> How about having smp_init() call into arch code to query whether
> it should bring up a not-already-online CPU?  Architectures that
> want to do something special can then make the decision there and
> everyone else can define the test completely away.

I experimented today with an ia64-only solution, keeping track of
'present' vs 'enabled' vs 'online' all in arch-specific code.

The arch-specific stuff turns out to be more or less a wash; that
is, it's not too hard to keep it all in ia64.

However, the problem is, I would still need a generic
'enabled_map' to control whether 'online' and 'crash_notes'
entries get created for /sys/devices/system/cpu/cpuN/.

So if other archs are at least neutral on this class of CPUs, I
can work on another patchset that lowers the tax to a simple
#define for archs that don't care.

But if people hate this idea of a new map, I'd like to know so
that I'm not wasting my time and can work on a different solution
(what that would be, I have no idea at the moment).

Thanks.

/ac


WARNING: multiple messages have this Message-ID (diff)
From: Alex Chiang <achiang@hp.com>
To: Matthew Wilcox <matthew@wil.cx>, Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-acpi@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: [PATCH 01/14] Introduce cpu_enabled_map and friends
Date: Wed, 16 Jul 2008 01:11:42 +0000	[thread overview]
Message-ID: <20080716011142.GI10919@ldl.fc.hp.com> (raw)
In-Reply-To: <20080715184822.GB29991@flint.arm.linux.org.uk>

* Russell King <rmk+lkml@arm.linux.org.uk>:
> On Tue, Jul 15, 2008 at 12:16:32PM -0600, Matthew Wilcox wrote:
> > On Tue, Jul 15, 2008 at 11:57:40AM -0600, Alex Chiang wrote:
> > > My thought was that big SMP systems like ia64, possibly sparc and
> > > ppc, and increasingly, x86, might find something like this
> > > useful, as systems get larger and larger, and vendors are going
> > > to want to do RAS-ish features, like the ability to keep CPUs in
> > > firmware across reboots until told otherwise by the sysadmin.
> > > 
> > > Right now, a 'present' CPU strongly implies 'online' as well,
> > > since we're calling cpu_up() for all 'present' CPUs in
> > > smp_init(). But this hurts if:
> > > 
> > > 	- you don't actually want to bring up all 'present' CPUs
> > > 	- you still want to interact with these weirdo zombie
> > > 	  CPUs that are 'present' but not 'online'
> > 
> > Have you considered simply failing __cpu_up() for CPUs that are
> > deconfigured by firmware?
> 
> But what if you want to have a system boot with, say, 4 CPUs and
> then decide at run time to bring up another 4 CPUs when required?
> 
> How about having smp_init() call into arch code to query whether
> it should bring up a not-already-online CPU?  Architectures that
> want to do something special can then make the decision there and
> everyone else can define the test completely away.

I experimented today with an ia64-only solution, keeping track of
'present' vs 'enabled' vs 'online' all in arch-specific code.

The arch-specific stuff turns out to be more or less a wash; that
is, it's not too hard to keep it all in ia64.

However, the problem is, I would still need a generic
'enabled_map' to control whether 'online' and 'crash_notes'
entries get created for /sys/devices/system/cpu/cpuN/.

So if other archs are at least neutral on this class of CPUs, I
can work on another patchset that lowers the tax to a simple
#define for archs that don't care.

But if people hate this idea of a new map, I'd like to know so
that I'm not wasting my time and can work on a different solution
(what that would be, I have no idea at the moment).

Thanks.

/ac


  parent reply	other threads:[~2008-07-16  1:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15  2:33 [PATCH 00/14] Introduce cpu_enabled_map and friends Alex Chiang
2008-07-15  2:33 ` [PATCH 01/14] " Alex Chiang
2008-07-15  3:15   ` Matthew Wilcox
2008-07-15 10:03     ` Andi Kleen
2008-07-15 10:21       ` Russell King
2008-07-15 17:57         ` Alex Chiang
2008-07-15 18:16           ` Matthew Wilcox
2008-07-15 18:48             ` Russell King
2008-07-15 19:15               ` Alex Chiang
2008-07-18 21:44                 ` Russell King
2008-07-18 23:08                   ` Alex Chiang
2008-07-16  1:11               ` Alex Chiang [this message]
2008-07-16  1:11                 ` Alex Chiang
2008-07-15  2:33 ` [PATCH 02/14] [M32R] Populate cpu_enabled_map Alex Chiang
2008-07-15  2:33 ` [PATCH 03/14] [ALPHA] " Alex Chiang
2008-07-15  2:34 ` [PATCH 04/14] [ARM] " Alex Chiang
2008-07-15  2:34 ` [PATCH 05/14] [MIPS] " Alex Chiang
2008-07-15  2:34 ` [PATCH 06/14] [PARISC] " Alex Chiang
2008-07-15  2:34 ` [PATCH 07/14] [POWERPC] " Alex Chiang
2008-07-15  5:51   ` Benjamin Herrenschmidt
2008-07-16  1:04     ` Alex Chiang
2008-07-15  2:34 ` [PATCH 08/14] [S390] " Alex Chiang
2008-07-15  2:34 ` [PATCH 09/14] [SH] " Alex Chiang
2008-07-15  2:34 ` [PATCH 12/14] [IA64] Populate and use cpu_enabled_map Alex Chiang
2008-07-15  2:34 ` [PATCH 13/14] [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic() Alex Chiang
2008-07-15  2:34 ` [PATCH 14/14] ACPI: Provide /sys/devices/system/cpu/cpuN/deconfigure Alex Chiang
2008-07-15 17:06   ` Andi Kleen
2008-07-15 18:40     ` Alex Chiang
2008-07-15  2:56 ` [PATCH 11/14] x86: Populate cpu_enabled_map Alex Chiang
2008-07-18 20:00   ` H. Peter Anvin
2008-07-18 20:00     ` H. Peter Anvin
2008-07-18 23:06     ` Alex Chiang
2008-07-15 20:10 ` [PATCH 00/14] Introduce cpu_enabled_map and friends Luck, Tony
2008-07-15 20:10   ` Luck, Tony
2008-07-15 23:54   ` Alex Chiang
2008-07-15 23:54     ` Alex Chiang

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=20080716011142.GI10919@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=andi@firstfloor.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.