[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c7e9ebe-1555-44e6-a701-76890ca5b08d@intel.com>
Date: Wed, 24 Dec 2025 18:20:47 +0800
From: "Chen, Yu C" <yu.c.chen@...el.com>
To: Vern Hao <haoxing990@...il.com>
CC: Juri Lelli <juri.lelli@...hat.com>, Dietmar Eggemann
<dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, Ben Segall
<bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, Valentin Schneider
<vschneid@...hat.com>, Madadi Vineeth Reddy <vineethr@...ux.ibm.com>, "Hillf
Danton" <hdanton@...a.com>, Shrikanth Hegde <sshegde@...ux.ibm.com>,
"Jianyong Wu" <jianyong.wu@...look.com>, Yangyu Chen <cyy@...self.name>,
Tingyin Duan <tingyin.duan@...il.com>, Vern Hao <vernhao@...cent.com>, Len
Brown <len.brown@...el.com>, Aubrey Li <aubrey.li@...el.com>, Zhao Liu
<zhao1.liu@...el.com>, Chen Yu <yu.chen.surf@...il.com>, Adam Li
<adamli@...amperecomputing.com>, Aaron Lu <ziqianlu@...edance.com>, Tim Chen
<tim.c.chen@...el.com>, <linux-kernel@...r.kernel.org>, Tim Chen
<tim.c.chen@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>, "K
Prateek Nayak" <kprateek.nayak@....com>, "Gautham R . Shenoy"
<gautham.shenoy@....com>, Vincent Guittot <vincent.guittot@...aro.org>, "Ingo
Molnar" <mingo@...hat.com>
Subject: Re: [PATCH v2 05/23] sched/cache: Assign preferred LLC ID to
processes
On 12/19/2025 12:01 PM, Vern Hao wrote:
>
> On 2025/12/16 03:32, Tim Chen wrote:
>> On Fri, 2025-12-12 at 11:34 +0800, Vern Hao wrote:
>>> On 2025/12/4 07:07, Tim Chen wrote:
>>>> With cache-aware scheduling enabled, each task is assigned a
>>>> preferred LLC ID. This allows quick identification of the LLC domain
>>>> where the task prefers to run, similar to numa_preferred_nid in
>>>> NUMA balancing.
>>>>
[snip]
>>>> +
>>>> + if (mm->mm_sched_cpu != -1) {
>>>> + mm_sched_llc = llc_id(mm->mm_sched_cpu);
>>>> +
>>>> +#ifdef CONFIG_NUMA_BALANCING
>>>> + /*
>>>> + * Don't assign preferred LLC if it
>>>> + * conflicts with NUMA balancing.
>>>> + */
>>>> + if (p->numa_preferred_nid >= 0 &&
>>> I wonder if the restriction here shouldn't be so strict. In Mel Gorman's
>>> patch (e496132ebedd sched/fair: Adjust the allowed NUMA imbalance when
>>> SD_NUMA spans multiple LLCs), the value of the 'imb_numa_nr' is checked
>>> to determine if |SD_NUMA| imbalance is allowed. Could we use this same
>>> check to decide whether or not to perform a cross-numa migration?
>> If we set the preferred LLC that's in a different node other than the
>> preferred
>> node, the preferred LLC is going to fight with NUMA balancing and bounce
>> tasks back and forth between nodes. NUMA locality is going to affect
>> performance
>> more so we'll let NUMA preference take precedence.
>
> I might not have explained myself clearly. I’m questioning whether we
> need to integrate an imbalance check into the 'sgs->group_type|' is
> ’group_has_spare|' scenario, like Mel’s patch, to refine our llc
> migration decisions.
>
> just like this: 8 cpus in one LLC, LLC-A has 6 tasks, LLC-B has 2
> tasks, if LLC-A has task_a need to migrate to LLC_B, how to deal it ?
>
If LLC_B is the preferred LLC of task_a, and if the average utilization of
LLC_B has not reached 50%, task_a will be moved to LLC_B. If LLC_A is the
preferred LLC of task_a, then if LLC_A has not reached 50%, task_a will
not be migrated to LLC_B. There are some comments around can_migrate_llc(),
which describe the decision matrix for migration.
thanks,
Chenyu
Powered by blists - more mailing lists