Re: [PATCH v3 03/21] sched/cache: Introduce helper functions to enforce LLC migration policy
From: Chen, Yu C
Date: Sun Feb 15 2026 - 07:14:55 EST
On 2/15/2026 12:12 AM, Madadi Vineeth Reddy wrote:
On 11/02/26 03:48, Tim Chen wrote:
From: Chen Yu <yu.c.chen@xxxxxxxxx>
[ ... ]
Right, I previously considered only the snapshot of src/dst_util without
According to this matrix (which I assume shows utilization after migration),
G is expected for src=50% and dst=50%. However, the code performs the "both
busy" check before adjusting src_util and dst_util:
if (!fits_llc_capacity(dst_util, dst_cap) &&
!fits_llc_capacity(src_util, src_cap))
return mig_unrestricted;
src_util = src_util - tsk_util;
dst_util = dst_util + tsk_util;
For example, with a 10% task migrating from src_util=60% to dst_util=40%:
The check evaluates: !fits(40) && !fits(60) = false && true = false
- Doesn't return mig_unrestricted
- After adjustment: src=50%, dst=50%
- Falls through to return mig_llc (Y)
But the matrix indicates 50%/50% should be G, not Y.
Moving this check after the utilization adjustment would make it consistent
with the documented matrix.
accounting for the migrating task. To keep this consistent with the decision
matrix, I will adjust the sequence as you suggested.
thanks,
Chenyu
Thanks,
Vineeth