RE: [RFC PATCH v2 09/23] sched/cache: Account percpu sd task NUMA preference
From: Jianyong Wu
Date: Tue Sep 01 2026 - 04:48:20 EST
Hi Peter,
> -----Original Message-----
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Sent: Tuesday, September 1, 2026 3:55 PM
> To: Jianyong Wu <wujianyong@xxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>; Juri Lelli <juri.lelli@xxxxxxxxxx>;
> Vincent Guittot <vincent.guittot@xxxxxxxxxx>; Chen Yu
> <yu.c.chen@xxxxxxxxx>; Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>; Dietmar
> Eggemann <dietmar.eggemann@xxxxxxx>; Steven Rostedt
> <rostedt@xxxxxxxxxxx>; Ben Segall <bsegall@xxxxxxxxxx>; Mel Gorman
> <mgorman@xxxxxxx>; Valentin Schneider <vschneid@xxxxxxxxxx>; K
> Prateek Nayak <kprateek.nayak@xxxxxxx>; Shrikanth Hegde
> <sshegde@xxxxxxxxxxxxx>; Phil Auld <pauld@xxxxxxxxxx>; Andrew
> Morton <akpm@xxxxxxxxxxxxxxxxxxxx>; David Hildenbrand
> <david@xxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx;
> jianyong.wu@xxxxxxxxxxx; Yuan Zhong <zhongyuan@xxxxxxxx>; Huangsj
> <huangsj@xxxxxxxx>; Fengyu Wang <wangfengyu@xxxxxxxx>; Zhiwei Ying
> <yingzhiwei@xxxxxxxx>; justin.he@xxxxxxx
> Subject: Re: [RFC PATCH v2 09/23] sched/cache: Account percpu sd task
> NUMA preference
>
> On Thu, Aug 27, 2026 at 08:28:02PM +0800, Jianyong Wu wrote:
> > Account for per-NUMA task count preferences within per-CPU sched
> domains,
> > mirroring the existing implementation of LLC task preference logic.
>
> So in general I would really appreciate a few words on *why* you're
> doing things. I mean, I can read the patch and see what it does, but I
> cannot divinate (esp. not without yet having read the rest of the
> patches) why you're doing things.
>
Fair point. This patch lays the groundwork for patch 12's NUMA-level
affinity score: that score weights each NUMA node by how many tasks on
the rq prefer it (numa_counts[node] * distance_delta), so we need a
per-node task count alongside the existing per-LLC count.
> This is esp. important for large series -- or series that do complicated
> things -- or like this case: both!
I'll document this motivation in the commit message.
Thanks
Jianyong
>
>