mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: trenn@suse.de, Prarit Bhargava <prarit@redhat.com>
Subject: [PATCH 0/2] Add CONFIG_PERMANENT_CPU_TOPOLOGY [v2]
Date: Wed, 21 Oct 2015 12:06:36 -0400	[thread overview]
Message-ID: <1445443598-21036-1-git-send-email-prarit@redhat.com> (raw)

The information in /sys/devices/system/cpu/cpuX/topology
directory is useful for userspace monitoring applications and in-tree
utilities like cpupower & turbostat.

When down'ing a CPU the /sys/devices/system/cpu/cpuX/topology directory is
removed during the CPU_DEAD hotplug callback in the kernel.  The problem
with this model is that the CPU has not been physically removed and the
data in the topology directory is still valid.

This patchset adds CONFIG_PERMANENT_CPU_TOPOLOGY, and is Y by default for
x86, an N for all other arches.  When enabled the kernel is modified so
that the topology directory is added to the core cpu sysfs files so that
the topology directory exists for the lifetime of the CPU.  When
disabled, the behavior of the current kernel is maintained (that is, the
topology directory is removed on a down and added on an up).  Adding
CONFIG_PERMANENT_CPU_TOPOLOGY may require additional architecture so that
the cpumask data the CPU's topology is not cleared during a CPU down.

This patchset combines drivers/base/topology.c and drivers/base/cpu.c to
implement CONFIG_PERMANENT_CPU_TOPOLOGY, and leaves all arches except
x86 with the current behavior, and adds an additional minor cleanup to
drivers/base/cpu.c.

[v2]: core_siblings, and thread_siblings are "numa siblings that are online"
and "thread siblings that are online" and are used as such within the kernel.
They must be zero'd out when the CPU is offline.

Prarit Bhargava (2):
  cpu hotplug, add CONFIG_PERMANENT_CPU_TOPOLOGY and keep topology
    directory for lifetime of CPU [v2]
  base, cpu, remove hotplugable_cpu_attr_groups

 arch/x86/kernel/smpboot.c |    3 -
 drivers/base/Kconfig      |   13 ++++
 drivers/base/Makefile     |    2 +-
 drivers/base/cpu.c        |  141 ++++++++++++++++++++++++++++++++++++++---
 drivers/base/topology.c   |  155 ---------------------------------------------
 5 files changed, 146 insertions(+), 168 deletions(-)
 delete mode 100644 drivers/base/topology.c

-- 
1.7.9.3


             reply	other threads:[~2015-10-21 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 16:06 Prarit Bhargava [this message]
2015-10-21 16:06 ` [PATCH 1/2] cpu hotplug, add CONFIG_PERMANENT_CPU_TOPOLOGY and keep topology directory for lifetime of CPU [v2] Prarit Bhargava
2015-10-25 19:15   ` kbuild test robot
2015-10-27 15:50   ` Thomas Renninger
2015-10-30 12:19     ` Prarit Bhargava
2015-10-21 16:06 ` [PATCH 2/2] base, cpu, remove hotplugable_cpu_attr_groups Prarit Bhargava

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=1445443598-21036-1-git-send-email-prarit@redhat.com \
    --to=prarit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trenn@suse.de \
    /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

Powered by JetHome