diff options
| author | Tejun Heo <tj@kernel.org> | 2026-07-24 09:09:28 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-07-24 12:10:22 -1000 |
| commit | 3a21e34eb2588e135190cf5c48e64397bc18d0b5 (patch) | |
| tree | 7664b3a2ed5243869c37c6ffdc824e4429564d6f /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 49d6247d64aec7ba1590223d277c47ae09037d4d (diff) | |
sched_ext: Gate scx_bpf_cidperf_set() behind a new SCX_CAP_PERF
scx_bpf_cidperf_set() reaches cpufreq with no cap check, so any cid-form
sub-sched can steer the frequency of any cid in its view, including ones it
holds nothing on.
Gate it behind a new SCX_CAP_PERF rather than SCX_CAP_BASE: hardware control
is a separate axis from queue access - a parent may well delegate scheduling
on a cid without handing over its frequency. PERF neither implies nor is
implied by the other caps. The check runs under the target rq's lock, which
ecaps updates are also folded under, so it is authoritative - a write can
never land after a revoke has taken effect. Denials are counted in
SCX_EV_SUB_CIDPERF_DENIED.
The operation is synchronous and the outcome is reported to the caller:
scx_bpf_cidperf_set() now returns 0 or -errno, -EACCES on denial. The
cid-form interface is still under initial development, so the signature is
changed in place without versioning.
scx_qmap grants PERF alongside its existing cid grants so the cpuperf demo
keeps working in sub-scheds.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
