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

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
..
ABI xfs: fix the contact address for the sysfs ABI documentation 2024-12-27 13:58:44 +01:00
accel
accounting
admin-guide x86/microcode: Prepare for minimal revision check 2025-03-07 16:45:54 +01:00
arch arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented 2025-02-21 13:57:26 +01:00
block
bpf bpf: Replace bpf_lpm_trie_key 0-length array with flexible array 2024-08-19 06:04:27 +02:00
cdrom scsi: sr: Fix unintentional arithmetic wraparound 2024-07-25 09:50:40 +02:00
core-api workqueue: doc: Fix function and sysfs path errors 2023-10-12 07:27:22 -10:00
cpu-freq
crypto
dev-tools selftests: Introduce Makefile variable to list shared bash scripts 2024-10-17 15:24:13 +02:00
devicetree dt-bindings: coresight: qcom,coresight-tpdm: Fix too many 'reg' 2025-04-25 10:45:34 +02:00
doc-guide
driver-api ipmi: docs: don't advertise deprecated sysfs entries 2024-10-04 16:29:12 +02:00
fault-injection
fb
features
filesystems fs_parser: update mount_api doc to match function signature 2024-12-09 10:32:31 +01:00
firmware_class
firmware-guide
fpga
gpu drm: Allow drivers to indicate the damage helpers to ignore damage clips 2024-01-31 16:19:08 -08:00
hid
hwmon hwmon: corsair-psu: add USB id of HX1200i Series 2023 psu 2024-08-14 13:58:41 +02:00
i2c i2c: i801: Add support for Intel Panther Lake 2025-01-09 13:31:43 +01:00
iio
images
infiniband
input
isdn
kbuild kbuild: doc: Update default INSTALL_MOD_DIR from extra to updates 2024-07-05 09:33:56 +02:00
kernel-hacking
leds
litmus-tests
livepatch
locking kcsan, seqlock: Support seqcount_latch_t 2024-12-09 10:31:51 +01:00
maintainer
mhi
misc-devices
mm mm/page_table_check: support userfault wr-protect entries 2024-08-19 06:04:29 +02:00
netlabel
netlink netlink: specs: rt-link: adjust mctp attribute naming 2025-04-25 10:45:43 +02:00
networking strparser: Add read_sock callback 2025-02-27 04:10:50 -08:00
nvdimm
nvme
PCI
pcmcia
peci
power Documentation: PM: Clarify pm_runtime_resume_and_get() return value 2024-12-19 18:11:30 +01:00
powerpc docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
process rust: upgrade to Rust 1.73.0 2024-02-16 19:10:43 +01:00
RCU doc: rcu: update printed dynticks counter bits 2024-12-09 10:31:48 +01:00
riscv docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
rust docs: rust: update Rust docs output path 2023-10-19 16:39:03 +02:00
scheduler sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
scsi
security
sound ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument 2024-02-05 20:14:26 +00:00
sphinx docs: kernel_include.py: Cope with docutils 0.21 2024-05-25 16:22:55 +02:00
sphinx-static
spi
staging
target
timers sched/isolation: Prevent boot crash when the boot CPU is nohz_full 2025-03-22 12:50:37 -07:00
tools
trace Documentation: probes: Add a new ret_ip callback parameter 2023-10-17 10:21:45 +09:00
translations docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
usb
userspace-api media: mc: Expand MUST_CONNECT flag to always require an enabled link 2024-04-03 15:28:17 +02:00
virt Documentation: KVM: fix warning in "make htmldocs" 2024-10-04 16:30:03 +02:00
w1
watchdog
wmi
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: Restore "smart quotes" for quotes 2024-04-03 15:28:22 +02:00
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst