public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mike Turquette <mturquette@ti.com>
Cc: linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, linaro-dev@lists.linaro.org,
	patches@linaro.org, gregkh@suse.de, amit.kucheria@linaro.org
Subject: Re: [PATCH v3 1/2] cpumask: introduce cpumask for hotpluggable CPUs
Date: Thu, 11 Aug 2011 22:02:37 +0200	[thread overview]
Message-ID: <1313092957.26866.7.camel@twins> (raw)
In-Reply-To: <1313092487-15858-1-git-send-email-mturquette@ti.com>

On Thu, 2011-08-11 at 12:54 -0700, Mike Turquette wrote:
> On some platforms it is possible to have some CPUs which support CPU
> hotplug and some which do not.  Currently the prescence of an 'online'
> sysfs entry in userspace is adequate for applications to know that a CPU
> supports hotplug, but there is no convenient way to make the same
> determination in the kernel.
> 
> To better model this relationship this patch introduces a new cpumask to
> track CPUs that support CPU hotplug operations.
> 
> This new cpumask is populated at boot-time and remains static for the
> life of the machine.  Bits set in the mask indicate a CPU which supports
> hotplug, but make no guarantees about whether that CPU is currently
> online or not.  Likewise a cleared bit in the mask indicates either a
> CPU which cannot hotplug or a lack of a populated CPU.
> 
> The purpose of this new cpumask is to aid kernel code which uses CPU to
> take CPUs online and offline.  Possible uses are as a thermal event
> mitigation technique or as a power capping mechanism. 

Nacked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

the kernel really shouldn't be using hotplug for this (nor should
userspace really). hot-unplugging random cpus wrecks things like
cpusets. Furthermore hotplug does way too much work to use as a simple
means to idle a cpu.

Even the availability of this mask is wrong, since that implies the
information is useful, which per the above it is not, the kernel
shouldn't care about this full-stop.

The only reason for the OS to unplug a CPU is imminent and unavoidable
hardware failure. Thermal capping is not that (and yes ACPI-4.0 is a
broken piece of shit).



      parent reply	other threads:[~2011-08-11 20:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 20:03 [PATCH v2 0/2] new cpumask for hotpluggable CPUs Mike Turquette
2011-08-10 20:03 ` [PATCH v2 1/2] cpumask: introduce " Mike Turquette
2011-08-10 20:53   ` Daniel Lezcano
2011-08-11  6:06   ` Amit Kucheria
2011-08-11 18:39     ` Turquette, Mike
2011-08-10 20:03 ` [PATCH v2 2/2] cpu: update cpu_hotpluggable_mask in register_cpu Mike Turquette
2011-08-10 20:54   ` Daniel Lezcano
2011-08-11 18:30 ` [PATCH v2 0/2] new cpumask for hotpluggable CPUs Peter Zijlstra
2011-08-11 19:25   ` Turquette, Mike
2011-08-11 19:38     ` Peter Zijlstra
2011-08-11 19:54 ` [PATCH v3 1/2] cpumask: introduce " Mike Turquette
2011-08-11 19:54   ` [PATCH v3 2/2] cpu: update cpu_hotpluggable_mask in register_cpu Mike Turquette
2011-08-11 20:02   ` Peter Zijlstra [this message]

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=1313092957.26866.7.camel@twins \
    --to=peterz@infradead.org \
    --cc=amit.kucheria@linaro.org \
    --cc=gregkh@suse.de \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mturquette@ti.com \
    --cc=patches@linaro.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