Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs/sched: Make the sched-stats documentation consistent

pull_task(), the original function to move the task from src_rq to the
dst_rq during load balancing was renamed to move_tasks() in commit
ddcdf6e7d991 ("sched: Rename load-balancing fields")

As a part of commit 163122b7fcfa ("sched/fair: Remove
double_lock_balance() from load_balance()"), move_task() was broken down
into detach_tasks() and attach_tasks() pair to avoid holding locks of
both src_rq and dst_rq at the same time during load balancing.

Despite the evolution of pull_task() over the years, the sched-stats
documentation remained unchanged. Update the documentation to refer to
detach_task() instead of pull_task() which is responsible for removing
the task from the src_rq during load balancing.

commit 1c055a0f5d3b ("sched: Move sched domain name out of
CONFIG_SCHED_DEBUG") moves sched domain name out of CONFIG_SCHED_DEBUG.
Update the documentation related to that.

Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250430062559.1188661-1-swapnil.sapkal@amd.com

authored by

Swapnil Sapkal and committed by
Jonathan Corbet
d3f82503 112fe8c2

+31 -22
+31 -22
Documentation/scheduler/sched-stats.rst
··· 86 86 ----------------- 87 87 One of these is produced per domain for each cpu described. (Note that if 88 88 CONFIG_SMP is not defined, *no* domains are utilized and these lines 89 - will not appear in the output. <name> is an extension to the domain field 90 - that prints the name of the corresponding sched domain. It can appear in 91 - schedstat version 17 and above. 89 + will not appear in the output.) 92 90 93 91 domain<N> <name> <cpumask> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 94 92 95 - The first field is a bit mask indicating what cpus this domain operates over. 93 + The <name> field prints the name of the sched domain and is only supported 94 + with schedstat version >= 17. On previous versions, <cpumask> is the first 95 + field. 96 + 97 + The <cpumask> field is a bit mask indicating what cpus this domain operates 98 + over. 96 99 97 100 The next 33 are a variety of sched_balance_rq() statistics in grouped into types 98 101 of idleness (busy, idle and newly idle): ··· 106 103 load did not require balancing when busy 107 104 3) # of times in this domain sched_balance_rq() tried to move one or 108 105 more tasks and failed, when the cpu was busy 109 - 4) Total imbalance in load when the cpu was busy 110 - 5) Total imbalance in utilization when the cpu was busy 111 - 6) Total imbalance in number of tasks when the cpu was busy 112 - 7) Total imbalance due to misfit tasks when the cpu was busy 113 - 8) # of times in this domain pull_task() was called when busy 114 - 9) # of times in this domain pull_task() was called even though the 106 + 4) Total imbalance in load in this domain when the cpu was busy 107 + 5) Total imbalance in utilization in this domain when the cpu was busy 108 + 6) Total imbalance in number of tasks in this domain when the cpu was busy 109 + 7) Total imbalance due to misfit tasks in this domain when the cpu was 110 + busy 111 + 8) # of times in this domain detach_task() was called when busy 112 + 9) # of times in this domain detach_task() was called even though the 115 113 target task was cache-hot when busy 116 114 10) # of times in this domain sched_balance_rq() was called but did not 117 115 find a busier queue while the cpu was busy ··· 125 121 the load did not require balancing when the cpu was idle 126 122 14) # of times in this domain sched_balance_rq() tried to move one or 127 123 more tasks and failed, when the cpu was idle 128 - 15) Total imbalance in load when the cpu was idle 129 - 16) Total imbalance in utilization when the cpu was idle 130 - 17) Total imbalance in number of tasks when the cpu was idle 131 - 18) Total imbalance due to misfit tasks when the cpu was idle 132 - 19) # of times in this domain pull_task() was called when the cpu 124 + 15) Total imbalance in load in this domain when the cpu was idle 125 + 16) Total imbalance in utilization in this domain when the cpu was idle 126 + 17) Total imbalance in number of tasks in this domain when the cpu was idle 127 + 18) Total imbalance due to misfit tasks in this domain when the cpu was 128 + idle 129 + 19) # of times in this domain detach_task() was called when the cpu 133 130 was idle 134 - 20) # of times in this domain pull_task() was called even though 131 + 20) # of times in this domain detach_task() was called even though 135 132 the target task was cache-hot when idle 136 133 21) # of times in this domain sched_balance_rq() was called but did 137 134 not find a busier queue while the cpu was idle ··· 145 140 load did not require balancing when the cpu was just becoming idle 146 141 25) # of times in this domain sched_balance_rq() tried to move one or more 147 142 tasks and failed, when the cpu was just becoming idle 148 - 26) Total imbalance in load when the cpu was just becoming idle 149 - 27) Total imbalance in utilization when the cpu was just becoming idle 150 - 28) Total imbalance in number of tasks when the cpu was just becoming idle 151 - 29) Total imbalance due to misfit tasks when the cpu was just becoming idle 152 - 30) # of times in this domain pull_task() was called when newly idle 153 - 31) # of times in this domain pull_task() was called even though the 143 + 26) Total imbalance in load in this domain when the cpu was just becoming 144 + idle 145 + 27) Total imbalance in utilization in this domain when the cpu was just 146 + becoming idle 147 + 28) Total imbalance in number of tasks in this domain when the cpu was just 148 + becoming idle 149 + 29) Total imbalance due to misfit tasks in this domain when the cpu was 150 + just becoming idle 151 + 30) # of times in this domain detach_task() was called when newly idle 152 + 31) # of times in this domain detach_task() was called even though the 154 153 target task was cache-hot when just becoming idle 155 154 32) # of times in this domain sched_balance_rq() was called but did not 156 155 find a busier queue while the cpu was just becoming idle