linux-yocto/Documentation/scheduler
Vincent Guittot 7fc781ca93 sched/topology: Consolidate and clean up access to a CPU's max compute capacity
[ Upstream commit 7bc263840b ]

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
Stable-dep-of: 79443a7e9da3 ("cpufreq/sched: Explicitly synchronize limits_changed flag handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:50:41 +02:00
..
completion.rst docs: scheduler: completion: Fix minor error in pseudo-code 2023-07-14 13:08:07 -06:00
index.rst It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
sched-arch.rst sh: remove sh5/sh64 last fragments 2023-03-23 10:02:02 +01:00
sched-bwc.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sched-capacity.rst sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
sched-deadline.rst sched/deadline: Update GRUB description in the documentation 2023-06-16 22:08:12 +02:00
sched-debug.rst sched/numa-balancing: Move some document to make it consistent with the code 2022-02-11 23:30:08 +01:00
sched-design-CFS.rst sched/eevdf/doc: Modify the documented knob to base_slice_ns as well 2023-08-24 21:31:57 +02:00
sched-domains.rst docs: scheduler: Fix outdated parameter of rebalance_domains 2022-02-01 16:29:25 -07:00
sched-energy.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sched-nice-design.rst Documentation: scheduler: fixed 2 typos in sched-nice-design.rst 2021-05-17 12:42:59 -06:00
sched-pelt.c sched/fair: Fix "runnable_avg_yN_inv" not used warnings 2019-06-17 12:15:58 +02:00
sched-rt-group.rst docs: cgroup-v1: add it to the admin-guide book 2019-07-15 11:03:02 -03:00
sched-stats.rst docs/scheduler: fix unit error 2022-04-16 02:54:32 -06:00
sched-util-clamp.rst sched/documentation: Document the util clamp feature 2023-01-05 12:08:34 +01:00
schedutil.rst docs: scheduler: Convert schedutil.txt to ReST 2022-03-16 15:03:24 -06:00
text_files.rst docs: scheduler: convert docs to ReST and rename to *.rst 2019-06-14 14:32:18 -06:00