From: Tim Chen <tim.c.chen@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Chen Yu <yu.c.chen@intel.com>,
Jemmy Wong <jemmywong512@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Randy Dunlap <rdunlap@infradead.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH 2/2] sched/cache: Fix decision matrix comment above can_migrate_llc()
Date: Thu, 12 Nov 2026 10:21:47 -0800 [thread overview]
Message-ID: <7ec95468b17ab48e4f4fd443c9c6377680e3fd84.1794507151.git.tim.c.chen@linux.intel.com> (raw)
In-Reply-To: <cover.1794507151.git.tim.c.chen@linux.intel.com>
The example tables in the comment did not match what the function
computes with the default thresholds. The imbalance test is a ratio,
so 50% is noticeably busier than 40% (25% above), and several cells
were wrong: 40%->60% toward the preferred LLC is forbidden, 50%->30%
out of the preferred LLC is allowed, and 60%->40% out is allowed.
Use 45% instead of 40% so the tables also illustrate the imb_pct
hysteresis, and recompute every cell from the code.
Fixes: 23b2b5ccc45ce ("sched/cache: Introduce helper functions to enforce LLC migration policy")
Cc: stable@vger.kernel.org # v7.2.y v7.3.y
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>
---
kernel/sched/fair.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cfc982205b98..5770ae37d1dc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10837,20 +10837,20 @@ static __maybe_unused bool get_llc_stats(int cpu, unsigned long *util,
* 1. moving towards the preferred LLC, dst is the preferred
* LLC, src is not.
*
- * src \ dst 30% 40% 50% 60%
- * 30% Y Y Y N
- * 40% Y Y Y Y
+ * src \ dst 30% 45% 50% 60%
+ * 30% Y Y N N
+ * 45% Y Y Y N
* 50% Y Y G G
* 60% Y Y G G
*
* 2. moving out of the preferred LLC, src is the preferred
* LLC, dst is not:
*
- * src \ dst 30% 40% 50% 60%
+ * src \ dst 30% 45% 50% 60%
* 30% N N N N
- * 40% N N N N
- * 50% N N G G
- * 60% Y N G G
+ * 45% N N N N
+ * 50% Y N G G
+ * 60% Y Y G G
*
* src : src_util
* dst : dst_util
--
2.32.0
prev parent reply other threads:[~2026-11-12 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 18:21 [PATCH 0/2] sched/cahce: Document cache aware scheduling Tim Chen
2026-11-12 18:21 ` [PATCH 1/2] Documentation/scheduler: Add cache aware scheduling documentation Tim Chen
2026-11-12 18:21 ` Tim Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ec95468b17ab48e4f4fd443c9c6377680e3fd84.1794507151.git.tim.c.chen@linux.intel.com \
--to=tim.c.chen@linux.intel.com \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=jemmywong512@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®