17.10 Utilization Clamping Configuration
Following the initialization of the PSI functional module, the task scheduler initialization pipeline invokes init_uclamp() to configure the baseline utilization clamping parameters. Utilization clamping (uclamp) is an optimization feature introduced in Linux 5.3 that empowers user space to pass performance requirements down to the scheduler via two adjustable constraints: the minimum required utilization boundary (UCLAMP_MIN) and the maximum permitted performance utilization boundary (UCLAMP_MAX). Equipped with this mechanism, the scheduling engine can execute more precise, hardware-aware decisions surrounding dynamic CPU frequency scaling (DVFS) and cross-core task migration paths.
The primary operational responsibilities of init_uclamp() encompass initializing the synchronization mutex lock uclamp_mutex, resetting the per-CPU runqueue tracking structures, configuring the explicit utilization clamping profiles for the bootstrap process (PID 0, init_task), and applying global default bounds over the master root task group. The uclamp_mutex lock is leveraged to guarantee concurrent execution safety whenever user space modifies the global uclamp configuration tables. Resetting the runqueue tracking loops flushes and clears the inner uclamp accounting blocks embedded inside the struct rq runqueue container of every individual CPU core to zero.