linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] cgroup/cpuset: Make cpuset hotplug processing synchronous
@ 2024-04-04 13:47 Waiman Long
  2024-04-04 13:47 ` [PATCH v2 1/2] " Waiman Long
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Waiman Long @ 2024-04-04 13:47 UTC (permalink / raw)
  To: Tejun Heo, Zefan Li, Johannes Weiner, Thomas Gleixner,
	Peter Zijlstra, Rafael J. Wysocki, Len Brown, Pavel Machek,
	Shuah Khan
  Cc: linux-kernel, cgroups, linux-pm, linux-kselftest,
	Frederic Weisbecker, Paul E. McKenney, Ingo Molnar,
	Valentin Schneider, Anna-Maria Behnsen, Alex Shi, Vincent Guittot,
	Michal Koutný, Waiman Long

 v2:
  - Found that rebuild_sched_domains() has external callers, revert its
    change and introduce rebuild_sched_domains_cpuslocked() instead.

As discussed in the LKML thread [1], the asynchronous nature of cpuset
hotplug handling code is causing problem with RCU testing. With recent
changes in the way locking is being handled in the cpuset code, it is
now possible to make the cpuset hotplug code synchronous again without
major changes.

This series enables the hotplug code to call directly into cpuset hotplug
core without indirection with the exception of the special case of v1
cpuset becoming empty still being handled indirectly with workqueue.

A new simple test case was also written to test this special v1 cpuset
case. The test_cpuset_prs.sh script was also run with LOCKDEP on to
verify that there is no regression.

[1] https://lore.kernel.org/lkml/ZgYikMb5kZ7rxPp6@slm.duckdns.org/

Waiman Long (2):
  cgroup/cpuset: Make cpuset hotplug processing synchronous
  cgroup/cpuset: Add test_cpuset_v1_hp.sh

 include/linux/cpuset.h                        |   3 -
 kernel/cgroup/cpuset.c                        | 141 +++++++-----------
 kernel/cpu.c                                  |  48 ------
 kernel/power/process.c                        |   2 -
 tools/testing/selftests/cgroup/Makefile       |   2 +-
 .../selftests/cgroup/test_cpuset_v1_hp.sh     |  46 ++++++
 6 files changed, 103 insertions(+), 139 deletions(-)
 create mode 100755 tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh

-- 
2.39.3


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

end of thread, other threads:[~2024-04-08 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 13:47 [PATCH v2 0/2] cgroup/cpuset: Make cpuset hotplug processing synchronous Waiman Long
2024-04-04 13:47 ` [PATCH v2 1/2] " Waiman Long
2024-04-08 15:22   ` Valentin Schneider
2024-04-04 13:47 ` [PATCH v2 2/2] cgroup/cpuset: Add test_cpuset_v1_hp.sh Waiman Long
2024-04-08 17:40 ` [PATCH v2 0/2] cgroup/cpuset: Make cpuset hotplug processing synchronous Tejun Heo

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