-
- Downloads
sched/topology: Consolidate and clean up access to a CPU's max compute capacity
Remove the rq::cpu_capacity_orig field and use arch_scale_cpu_capacity() instead. The scheduler uses 3 methods to get access to a CPU's max compute capacity: - arch_scale_cpu_capacity(cpu) which is the default way to get a CPU's capacity. - cpu_capacity_orig field which is periodically updated with arch_scale_cpu_capacity(). - capacity_orig_of(cpu) which encapsulates rq->cpu_capacity_orig. There is no real need to save the value returned by arch_scale_cpu_capacity() in struct rq. arch_scale_cpu_capacity() returns: - either a per_cpu variable. - or a const value for systems which have only one capacity. Remove rq::cpu_capacity_orig and use arch_scale_cpu_capacity() everywhere. No functional changes. Some performance tests on Arm64: - small SMP device (hikey): no noticeable changes - HMP device (RB5): hackbench shows minor improvement (1-2%) - large smp (thx2): hackbench and tbench shows minor improvement (1%) Signed-off-by:Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Reviewed-by:
Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20231009103621.374412-2-vincent.guittot@linaro.org
Showing
- Documentation/scheduler/sched-capacity.rst 7 additions, 6 deletionsDocumentation/scheduler/sched-capacity.rst
- kernel/sched/core.c 1 addition, 1 deletionkernel/sched/core.c
- kernel/sched/cpudeadline.c 1 addition, 1 deletionkernel/sched/cpudeadline.c
- kernel/sched/deadline.c 2 additions, 2 deletionskernel/sched/deadline.c
- kernel/sched/fair.c 8 additions, 10 deletionskernel/sched/fair.c
- kernel/sched/rt.c 1 addition, 1 deletionkernel/sched/rt.c
- kernel/sched/sched.h 0 additions, 6 deletionskernel/sched/sched.h
- kernel/sched/topology.c 5 additions, 2 deletionskernel/sched/topology.c
Loading
Please register or sign in to comment