linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: report present cpus in /proc/cpuinfo
Date: Wed, 22 Jun 2011 00:05:12 +0100	[thread overview]
Message-ID: <20110621230512.GL23234@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4E012198.6010405@nvidia.com>

On Tue, Jun 21, 2011 at 03:56:24PM -0700, Jon Mayo wrote:
> Because arm linux likes to dynamically hotplug cpus, the meaning of
> online has changed slightly. Previously online meant a cpus is
> schedulable, and conversely offline means they it is not schedulable.
> But with the current power management infrastructure there are cpus
> that can be scheduled (after they are woken up automatically), yet are
> not considered "online" because the masks and flags for them are not
> set.

There be sharks here.  glibc can read /proc/cpuinfo to find out how
many CPUs are online.  glibc can also read /proc/stat to determine
that number.

Both files should be using the same test to ensure consistency.  That
is using the online mask, not the present mask.

If a CPU is hot unplugged (and therefore the bit is clear in the online
map) then it is not available for scheduling, and the system will not
wake the CPU up without intervention, no matter how high the load will
become, without userspace assistance.

So I don't think your change is correct, and the code as it stands is
right.

  parent reply	other threads:[~2011-06-21 23:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 22:56 [PATCH] ARM: report present cpus in /proc/cpuinfo Jon Mayo
2011-06-21 22:59 ` Fabio Estevam
2011-06-21 23:05 ` Russell King - ARM Linux [this message]
2011-06-21 23:24   ` Jon Mayo
2011-06-21 23:36     ` Russell King - ARM Linux
2011-06-22  0:08       ` Jon Mayo
2011-06-22  9:36         ` Russell King - ARM Linux
2011-06-22 19:26           ` Jon Mayo
2011-06-22 20:19             ` Russell King - ARM Linux
2011-06-22 20:54               ` Jon Mayo
2011-06-22 20:57                 ` Russell King - ARM Linux

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=20110621230512.GL23234@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).