diff options
| author | Tim Chen <tim.c.chen@linux.intel.com> | 2026-04-01 14:52:20 -0700 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-04-09 15:49:49 +0200 |
| commit | a8d0ca0b7f2f7b53565d1e30e509d3d74d1f5460 (patch) | |
| tree | 49f6a7a63b8e6abc407e5abc84174aa3f994d003 /scripts/stackusage | |
| parent | 46afe3af7ead57190b6d362e214814ec804e3b7b (diff) | |
sched/cache: Introduce per CPU's tasks LLC preference counter
The lowest level of sched domain for each CPU is assigned an
array where each element tracks the number of tasks preferring
a given LLC, indexed from 0 to max_lid. Since each CPU
has its dedicated sd, this implies that each CPU will have
a dedicated task LLC preference counter.
For example, sd->llc_counts[3] = 2 signifies that there
are 2 tasks on this runqueue which prefer to run within LLC3.
The load balancer can use this information to identify busy
runqueues and migrate tasks to their preferred LLC domains.
This array will be reallocated at runtime during sched domain
rebuild.
Introduce the buffer allocation mechanism, and the statistics
will be calculated in the subsequent patch.
Note: the LLC preference statistics of each CPU are reset on
sched domain rebuild and may under count temporarily, until the
CPU becomes idle and the count is cleared. This is a trade off
to avoid complex data synchronization across sched domain builds.
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Suggested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Co-developed-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/42e79eceb8cd6be8a032401d481d101913bc5703.1775065312.git.tim.c.chen@linux.intel.com
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
