diff options
author | Xuewen Yan <xuewen.yan@unisoc.com> | 2025-02-19 17:37:47 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-15 10:28:50 +0100 |
commit | 4bc45824149ea83a1e293c674e7f542b8127afb6 (patch) | |
tree | e8ca4033b573732b1c1d096528cb802632d6e938 /tools/perf/scripts/python | |
parent | 5fca5a4cf97313dd2f5eae29624ceb1dc48f258a (diff) |
sched/uclamp: Optimize sched_uclamp_used static key enabling
Repeat calls of static_branch_enable() to an already enabled
static key introduce overhead, because it calls cpus_read_lock().
Users may frequently set the uclamp value of tasks, triggering
the repeat enabling of the sched_uclamp_used static key.
Optimize this and avoid repeat calls to static_branch_enable()
by checking whether it's enabled already.
[ mingo: Rewrote the changelog for legibility ]
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20250219093747.2612-2-xuewen.yan@unisoc.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions