patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Add and use get_cpu_cacheinfo_level()
@ 2024-06-10  0:39 Tony Luck
  2024-06-10  0:39 ` [PATCH v4 1/4] cpu: Move CPU hotplug function declarations into their own header Tony Luck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tony Luck @ 2024-06-10  0:39 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: x86, Fenghua Yu, Reinette Chatre, Maciej Wieczor-Retman,
	Peter Newman, James Morse, Babu Moger, Drew Fustini, Dave Martin,
	linux-kernel, patches, Tony Luck

This helper function came up in discussion of the resctrl patches
for Sub-NUMA Cluster (SNC) support. Reinette pointed out[1] that there
are already two places where it would clean things up by avoiding
open coding. The SNC patches will add two additional call sites.

So rather than have this jammed up as part of the SNC series, I'm
posting it as a simple standalone cleanup.

Signed-off-by: Tony Luck <tony.luck@intel.com>

[1] https://lore.kernel.org/all/050c64b3-20b3-4db6-b782-f5124ebaab31@intel.com/

---
Changes since v3:
Link: https://lore.kernel.org/all/20240606164047.318378-1-tony.luck@intel.com/

Addition of lockdep_assert_cpus_held() in v3 led to #include hell
because <linux/cacheinfo.h> needed <linux/cpu.h>

Patch 1 resolves this hell by cut-and-pasting all the CPU hotplug
defintions out of cpu.h and into a new file cpuhplock.h.

Patch 2 brings the pasted code up to current coding standards

Patch 3 is the previous patch 1, but adds <linux/cpuhplock.h> instead
of <linux/cpu.h> to <linux/cacheinfo.h>

Patch 4 is the previous patch 2, unchanged.

Tony Luck (4):
  cpu: Move CPU hotplug function declarations into their own header
  cpu: Drop "extern" from function declarations in cpuhplock.h
  cacheinfo: Add function to get cacheinfo for a given (cpu, cachelevel)
  x86/resctrl: Replace open code cacheinfo searches

 include/linux/cacheinfo.h                 | 25 +++++++++---
 include/linux/cpu.h                       | 33 +---------------
 include/linux/cpuhplock.h                 | 47 +++++++++++++++++++++++
 arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 17 +++-----
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    | 14 +++----
 5 files changed, 79 insertions(+), 57 deletions(-)
 create mode 100644 include/linux/cpuhplock.h


base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
-- 
2.45.0


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

end of thread, other threads:[~2024-06-10  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10  0:39 [PATCH v4 0/4] Add and use get_cpu_cacheinfo_level() Tony Luck
2024-06-10  0:39 ` [PATCH v4 1/4] cpu: Move CPU hotplug function declarations into their own header Tony Luck
2024-06-10  0:39 ` [PATCH v4 2/4] cpu: Drop "extern" from function declarations in cpuhplock.h Tony Luck
2024-06-10  0:39 ` [PATCH v4 3/4] cacheinfo: Add function to get cacheinfo for a given (cpu, cachelevel) Tony Luck
2024-06-10  0:39 ` [PATCH v4 4/4] x86/resctrl: Replace open code cacheinfo searches Tony Luck

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