Files
android_kernel_xiaomi_sm8450/include/linux/cpu.h
Vincent Donnefort 683010f555 ANDROID: cpu/hotplug: add pause/resume_cpus interface
pause_cpus intends to have a way to force a CPU to go idle and to resume
as quickly as possible, with as little disruption as possible on the
system. This is a way of saving energy or meet thermal constraints, for
which a full CPU hotunplug is too slow. A paused CPU is simply deactivated
from the scheduler point of view. This corresponds to the first hotunplug
step.

Each pause operation still needs some heavy synchronization. Allowing to
pause several CPUs in one go mitigate that issue.

Paused CPUs can be resumed with resume_cpus(), which also takes a cpumask
as an input.

Few limitations:

  * It isn't possible to pause a CPU which is running SCHED_DEADLINE task.

  * A paused CPU will be removed from any cpuset it is part of. Resuming
    the CPU won't put back this CPU in the cpuset if using cgroup1.
    Cgroup2 doesn't have this limitation.

  * per-CPU kthreads are still allowed to run on a paused CPU.

Bug: 161210528
Change-Id: I1f5cb28190f8ec979bb8640a89b022f2f7266bcf
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-12-08 19:08:52 +00:00

7.7 KiB