]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/cache: Calculate the LLC size and store it in sched_domain
authorChen Yu <yu.c.chen@intel.com>
Wed, 13 May 2026 20:39:15 +0000 (13:39 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 18 May 2026 19:33:15 +0000 (21:33 +0200)
commit7030513a08776b2ca70fccd5dfddf7bb5c5c88ba
treeb6ac0c9c88403aac76c35ac15db4e5913f08400b
parent7b34bb1ca324451c84c0a69136ce92e7928cf72b
sched/cache: Calculate the LLC size and store it in sched_domain

Cache aware scheduling needs to know the LLC size that a process
can use, so as to avoid memory-intensive tasks from being
over-aggregated on a single LLC.

Introduce a preparation patch to add get_effective_llc_bytes() to
get the LLC size that a CPU can use. The function can be further
enhanced by subtracting the LLC cache ways reserved by resctrl
(CAT in Intel RDT, etc).

Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Co-developed-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Tingyin Duan <tingyin.duan@gmail.com>
Link: https://patch.msgid.link/37afee09ff608034da0ce149e72d33b6f4698edf.1778703694.git.tim.c.chen@linux.intel.com
drivers/base/cacheinfo.c
include/linux/cacheinfo.h
include/linux/sched/topology.h
kernel/sched/topology.c