linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] drivers core: Introduce CPU type sysfs interface
@ 2020-10-03  1:17 Ricardo Neri
  2020-10-03  1:17 ` [PATCH 1/4] " Ricardo Neri
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Ricardo Neri @ 2020-10-03  1:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman, x86, Borislav Petkov, Ingo Molnar,
	Thomas Gleixner, Rafael J. Wysocki
  Cc: Tony Luck, Len Brown, Ravi V. Shankar, linux-kernel, Ricardo Neri

Hybrid CPU topologies combine processors with more than one type of
micro-architecture. Hence, it is possible that individual CPUs support
slightly different features (e.g., performance counters) and different
performance properties. Thus, there may be user space entities interested
in knowing the topology of the system based on the types of available
CPUs.

Currently, there exists an interface for the CPU capacity (/sys/devices/
system/cpu/cpuX/cpu_capacity). However, CPU capacity does not always map
to CPU types (by the way, I will submit a separate series to bring such
interface to x86).

This series proposes the new interface /sys/devices/system/cpu/types
which, in hybrid parts, creates a subdirectory for each type of CPU.
Each subdirectory contains a CPU list and a CPU map that user space can
query.

Patch 1 of the series proposes the generic interface, with hooks
that architectures can override to suit their needs. The three patches
patches implement such interface for x86 (as per request from Boris,
I pulled patch 2 from a separate submission [1]).

Thanks and BR,
Ricardo

[1]. https://lkml.org/lkml/2020/10/2/1013

Ricardo Neri (4):
  drivers core: Introduce CPU type sysfs interface
  x86/cpu: Describe hybrid CPUs in cpuinfo_x86
  x86/cpu/intel: Add function to get name of hybrid CPU types
  x86/cpu/topology: Implement the CPU type sysfs interface

 .../ABI/testing/sysfs-devices-system-cpu      |  13 ++
 arch/x86/include/asm/intel-family.h           |   4 +
 arch/x86/include/asm/processor.h              |  13 ++
 arch/x86/include/asm/topology.h               |   2 +
 arch/x86/kernel/cpu/common.c                  |   3 +
 arch/x86/kernel/cpu/cpu.h                     |   3 +
 arch/x86/kernel/cpu/intel.c                   |  23 ++
 arch/x86/kernel/cpu/topology.c                |  23 ++
 drivers/base/cpu.c                            | 214 ++++++++++++++++++
 include/linux/cpu.h                           |  12 +
 include/linux/cpuhotplug.h                    |   1 +
 11 files changed, 311 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2020-11-19  8:26 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03  1:17 [PATCH 0/4] drivers core: Introduce CPU type sysfs interface Ricardo Neri
2020-10-03  1:17 ` [PATCH 1/4] " Ricardo Neri
2020-10-03  3:27   ` Randy Dunlap
2020-10-06  1:15     ` Ricardo Neri
2020-10-10  3:14       ` Randy Dunlap
2020-10-03  8:53   ` Greg Kroah-Hartman
2020-10-03 11:05     ` Greg Kroah-Hartman
2020-10-06  1:08       ` Ricardo Neri
2020-10-06  0:57     ` Ricardo Neri
2020-10-06  7:37       ` Greg Kroah-Hartman
2020-10-07  3:14         ` Ricardo Neri
2020-10-07  5:15           ` Greg Kroah-Hartman
2020-10-08  3:34             ` Ricardo Neri
2020-11-12  6:19             ` Brice Goglin
2020-11-12  6:42               ` Greg Kroah-Hartman
2020-11-12  9:10                 ` Brice Goglin
2020-11-12 10:49                   ` Greg Kroah-Hartman
2020-11-17 15:55                     ` Brice Goglin
2020-11-18 10:45                       ` Brice Goglin
2020-11-18 10:57                         ` Greg Kroah-Hartman
     [not found]                     ` <38f290d2-4c3a-d1b0-f3cc-a0897ea10abd@gmail.com>
2020-11-12 11:34                       ` Greg Kroah-Hartman
2020-11-19  8:25                       ` Fox Chen
2020-10-03  1:17 ` [PATCH 2/4] x86/cpu: Describe hybrid CPUs in cpuinfo_x86 Ricardo Neri
2020-10-03  4:07   ` kernel test robot
2020-10-03  1:17 ` [PATCH 3/4] x86/cpu/intel: Add function to get name of hybrid CPU types Ricardo Neri
2020-10-03  1:17 ` [PATCH 4/4] x86/cpu/topology: Implement the CPU type sysfs interface Ricardo Neri
2020-10-03  3:33   ` Randy Dunlap
2020-10-03  5:28   ` kernel test robot
2020-10-03  8:55   ` Greg Kroah-Hartman
2020-10-06  1:05     ` Ricardo Neri
2020-10-03  8:49 ` [PATCH 0/4] drivers core: Introduce " Borislav Petkov
2020-10-06  0:27   ` Ricardo Neri
2020-10-06  8:51 ` Qais Yousef
2020-10-07  2:50   ` Ricardo Neri

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).