linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/9] x86/resctrl: mba_MBps enhancement
@ 2024-11-14  0:17 Tony Luck
  2024-11-14  0:17 ` [PATCH v9 1/9] x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags Tony Luck
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Tony Luck @ 2024-11-14  0:17 UTC (permalink / raw)
  To: Fenghua Yu, Reinette Chatre, Peter Newman, Jonathan Corbet, x86
  Cc: James Morse, Jamie Iles, Babu Moger, Randy Dunlap,
	Shaopeng Tan (Fujitsu), linux-kernel, linux-doc, patches,
	Tony Luck

Add support to choose the memory monitor bandwidth event independently
for each ctrl_mon group when resctrl is mounted with the mba_MBps
option. Users may want this for applications that are not localized to
NUMA boundaries.  Default behavior still uses local memory bandwidth
when that event is supported by the platform.

Side benefit[0]: Systems that do not support the local bandwidth monitor
event but do support the total bandwidth event can now use the mba_MBps
mount option.

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

Patch(es):	Change
1:		New to this series. Almost direct copy from Babu's patch6
		in the ABMC series. Only change is to drop the __init
		from resctrl_file_fflags_init() because I need to use it
		at runtime for mount/unmount.

2:		Was patch 1
		Fenghua: Use is_mbm_local_enabled() instead of open
			 coded bit check.
		Reinette: Fix comment for @mba_mbps_event
			  Move check for local event after check for any event
			  Move initialization of rdtgroup_default.mba_mbps_event
			  into rdtgroup_setup_default() and make it conditional
			  on is_mbm_local_enabled().
			  Move initialization of rdtgrp->mba_mbps_event inside
			  "if (resctrl_arch_mon_capable())" and make it
			  conditional on is_mba_sc(NULL).
		Tony: Moved the fallback to total bandwidth to later in
		      series until all code is changed to cope with total.

3-4:		Was 2-3
		Reinette: Shuffled the pieces of these two patches to
			  flow better.
		Fenghue: Don't drop the comment when refactoring, but do
			 update a little.

5:		Was 4. No change.

6:		Was 5.
		Reinette: Expand commit change log
			  Fix rdtgroup_mba_mbps_event_show() to return -ENOENT
			  if rdtgrp isn't found.
			  Add pr_warn_once() to cover default case in switch.
			  File mode of mba_MBps_event 0444 in this patch.
			  Initialize .fflags to "RFTYPE_CTRL_BASE | RFTYPE_MON_BASE"
			  using Babu's resctrl_file_fflags_init() helper
			  instead of adding mba_mbps_event_init() function.

7:		Was 6.
		Reinette: Expand commit change log
			  Just use "Unsupported event" event for all invalid
			  user input instead of separate messages for
			  different problems.
			  Use this patch to switch mode from 0444 to 0644

8:		New. Moved the fallback to total bandwidth to this patch.

9:		No change. I punted on trying to explain the perils of
		users rapidly switching between mba_sc events.

[0] My original objective!

Babu Moger (1):
  x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags

Tony Luck (8):
  x86/resctrl: Prepare for per-ctrl_mon group mba_MBps control
  x86/resctrl: Modify update_mba_bw() to use per ctrl_mon group event
  x86/resctrl: Compute memory bandwidth for all supported events
  x86/resctrl: Relax checks for mba_MBps mount option
  x86/resctrl: Add "mba_MBps_event" file to ctrl_mon directories
  x86/resctrl: Add write option to "mba_MBps_event" file
  x86/resctrl: Make mba_sc use total bandwidth if local is not supported
  x86/resctrl: Document the new "mba_MBps_event" file

 Documentation/arch/x86/resctrl.rst        |  10 +++
 include/linux/resctrl.h                   |   2 +
 arch/x86/kernel/cpu/resctrl/internal.h    |   9 +-
 arch/x86/kernel/cpu/resctrl/core.c        |   9 +-
 arch/x86/kernel/cpu/resctrl/ctrlmondata.c |  70 +++++++++++++++
 arch/x86/kernel/cpu/resctrl/monitor.c     | 101 ++++++++++++----------
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    |  36 ++++----
 7 files changed, 173 insertions(+), 64 deletions(-)


base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
-- 
2.47.0


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

end of thread, other threads:[~2024-11-22 21:33 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14  0:17 [PATCH v9 0/9] x86/resctrl: mba_MBps enhancement Tony Luck
2024-11-14  0:17 ` [PATCH v9 1/9] x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags Tony Luck
2024-11-15 16:19   ` Moger, Babu
2024-11-20  0:38   ` Reinette Chatre
2024-11-21 17:21     ` Luck, Tony
2024-11-14  0:17 ` [PATCH v9 2/9] x86/resctrl: Prepare for per-ctrl_mon group mba_MBps control Tony Luck
2024-11-15 16:20   ` Moger, Babu
2024-11-18 23:47     ` Luck, Tony
2024-11-20  1:08   ` Reinette Chatre
2024-11-21 17:33     ` Luck, Tony
2024-11-22 21:33       ` Reinette Chatre
2024-11-14  0:17 ` [PATCH v9 3/9] x86/resctrl: Modify update_mba_bw() to use per ctrl_mon group event Tony Luck
2024-11-15 16:21   ` Moger, Babu
2024-11-19  0:01     ` Luck, Tony
2024-11-19  0:51       ` Reinette Chatre
2024-11-19  1:44         ` Luck, Tony
2024-11-19 17:36           ` Reinette Chatre
2024-11-20  3:39   ` Reinette Chatre
2024-11-14  0:17 ` [PATCH v9 4/9] x86/resctrl: Compute memory bandwidth for all supported events Tony Luck
2024-11-15 13:53   ` Peter Newman
2024-11-15 16:59     ` Luck, Tony
2024-11-20  3:45   ` Reinette Chatre
2024-11-21 17:36     ` Luck, Tony
2024-11-14  0:17 ` [PATCH v9 5/9] x86/resctrl: Relax checks for mba_MBps mount option Tony Luck
2024-11-20  3:54   ` Reinette Chatre
2024-11-21 17:39     ` Luck, Tony
2024-11-14  0:17 ` [PATCH v9 6/9] x86/resctrl: Add "mba_MBps_event" file to ctrl_mon directories Tony Luck
2024-11-20  4:03   ` Reinette Chatre
2024-11-21 17:42     ` Luck, Tony
2024-11-14  0:17 ` [PATCH v9 7/9] x86/resctrl: Add write option to "mba_MBps_event" file Tony Luck
2024-11-14  0:17 ` [PATCH v9 8/9] x86/resctrl: Make mba_sc use total bandwidth if local is not supported Tony Luck
2024-11-14  0:17 ` [PATCH v9 9/9] x86/resctrl: Document the new "mba_MBps_event" file 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).