Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] powercap: idle_inject: Create threads on demand
@ 2026-11-02 23:09 Daniel Lezcano
  2026-11-02 23:09 ` [PATCH 1/2] smpboot: Allow restricting per-CPU threads to a CPU mask Daniel Lezcano
  2026-11-02 23:09 ` [PATCH 2/2] powercap: idle_inject: Create per-CPU threads on registration Daniel Lezcano
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2026-11-02 23:09 UTC (permalink / raw)
  To: akpm, rafael, tglx, peterz
  Cc: Heiko Stuebner, moderated list:ARM/Rockchip SoC support,
	open list:ARM/Rockchip SoC support

Idle injection currently registers per-CPU kernel threads during early
initialization, including on CPUs for which no idle injection device
will be registered.

This series makes thread creation follow the lifetime and CPU mask of
each idle injection device.

The first patch adds an optional CPU mask to smpboot thread descriptors.
The mask restricts thread creation, CPU hotplug handling and teardown,
while preserving the existing behavior for descriptors without a mask.

The second patch uses this support to register idle injection threads
when a device registers and destroy them when it unregisters. CPU
ownership claims, registration rollback and thread teardown are
serialized to prevent overlapping registrations from sharing threads.

Validation includes W=1 builds of the affected objects, whitespace
checks and static review of the teardown locking paths. Concurrent
registration and CPU hotplug runtime testing remains outstanding.

The series was tested on Rockchip RK3588.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>

Daniel Lezcano (2):
  smpboot: Allow restricting per-CPU threads to a CPU mask
  powercap: idle_inject: Create per-CPU threads on registration

 drivers/powercap/idle_inject.c | 69 +++++++++++++++++++++-------------
 include/linux/smpboot.h        |  4 ++
 kernel/smpboot.c               | 17 ++++++++-
 3 files changed, 61 insertions(+), 29 deletions(-)


base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
-- 
2.43.0


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

end of thread, other threads:[~2026-11-03 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 23:09 [PATCH 0/2] powercap: idle_inject: Create threads on demand Daniel Lezcano
2026-11-02 23:09 ` [PATCH 1/2] smpboot: Allow restricting per-CPU threads to a CPU mask Daniel Lezcano
2026-11-03 11:48   ` Bradley Morgan
2026-11-02 23:09 ` [PATCH 2/2] powercap: idle_inject: Create per-CPU threads on registration Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox