Skip to content

powercap: idle_inject: Create threads on demand

Daniel Lezcano linux-arm-kernel linux-pm linux-rockchip lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2smpboot: Allow restricting per-CPU threads to a CPU maskinclude/linux/smpboot.h kernel/smpboot.c+19 -21 reply
2/2powercap: idle_inject: Create per-CPU threads on registrationdrivers/powercap/idle_inject.c+42 -270 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchBradley Morgan
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] powercap: idle_inject: Create threads on demand

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 <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

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

Signature · 6 lines
2.43.0

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip