mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Tim Chen <tim.c.chen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>
Cc: 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>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Documentation/scheduler: Add cache aware scheduling documentation
Date: Wed, 2 Dec 2026 11:51:58 +0530	[thread overview]
Message-ID: <66cb54ed-21d6-44e1-80d6-d122abc1d72a@linux.ibm.com> (raw)
In-Reply-To: <3aae2e10d163775fa43490757cae20ee14e509e3.camel@linux.intel.com>



On 12/2/26 5:01 AM, Tim Chen wrote:
> On Tue, 2026-12-01 at 23:27 +0530, Shrikanth Hegde wrote:
>> Hi tim, A few nits.
>>
> 
> Shrikanth,
> 
> Thanks for your review, much appreciated.
> 
> <snip>
>>>
>>> diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst
>>> index 791178ac8bec..67cf466a169b 100644
>>> --- a/Documentation/scheduler/index.rst
>>> +++ b/Documentation/scheduler/index.rst
>>> @@ -16,6 +16,7 @@ Scheduler
>>>        sched-domains
>>>        sched-capacity
>>>        sched-energy
>>> +    sched-cache
>>>        schedutil
>>>        sched-util-clamp
>>>        sched-nice-design
>>
>> Should the new entry be added at the end? I don't think the above is sorted.
> 
> Right, the list is not sorted. I put it after sched-domains,
> sched-capacity and sched-energy on purpose, because those are the
> other topology related documents and sched-cache.rst refers to the
> same concepts. I would prefer to keep it there, but I don't feel
> strongly about it. I can move it to the end if you or Jon prefer.
> 

Almost all of them are related to each other :)

I am okay with the current or at the end. Though I prefer at the end.
But that's not my call.

>>> +The LLC size is read from the generic cacheinfo framework. Architectures
>>> +that do not populate it (currently PowerPC, which has its own cacheinfo
>>> +implementation) report an LLC size of 0. When NUMA balancing is active,
>>> +any non-zero footprint then fails the check of Section 5 (c), so cache
>>> +aware scheduling is effectively disabled on these platforms.
>>
>> Hopefully below should help.
>>
>> https://lore.kernel.org/all/20261127152242.306333-1-sshegde@linux.ibm.com/#t
> 
> Thanks, moving powerpc to the generic cacheinfo is the right fix.
> I will drop the mention of PowerPC from this paragraph and keep only
> the general statement, so the document does not become stale when
> your series is merged.
> 

Keep it there for now. I am not sure which one would get merged.
If that series lands later, i will clean it up along with code comments.

> 
>>
>>> +
>>> +8.4 - NUMA balancing
>>> +^^^^^^^^^^^^^^^^^^^^
>>> +
>>> +The footprint estimate of Section 5 (c) comes from NUMA balancing fault
>>> +statistics. Without NUMA balancing, the footprint check is skipped, and
>>> +groups with a working set much larger than one LLC can still be aggregated.
>>> +With NUMA balancing, the scan is also limited to the relevant nodes, which
>>> +reduces its cost on large systems.
>>> +
>>> +8.5 - Multithreading (SMT)
>>> +^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> +
>>> +The thread limit of Section 5 (b) multiplies the number of running threads
>>> +by the number of hardware threads per core. Thus, it effectively counts
>>> +cores. On systems with many threads per core and small LLCs (for example
>>> +SMT-4 with 4 CPUs per LLC), almost every multi-threaded process fails this
>>> +check unless aggr_tolerance is raised.
>>
>> Due to above restriction is there a merit in adding a "status" debugfs entry
>> either per-proc or in llc_balancing where it indicates if the llc_balancing is
>> effectively disabled due to above HW limitations.
> 
> I agree that it is hard to tell today why a process is not
> aggregated. The cases are a bit different though:
> 
> - No sched domain partition spans more than one LLC. This is a global
>    state. It is only reported in dmesg with sched_verbose today, and
>    reading "enabled" returns what the user asked for, not what is in
>    effect. A read-only file in llc_balancing/ could show it.
> 
> - llc_bytes is 0. This is per LLC domain, so it would fit better in
>    the per domain debugfs directory. Your cacheinfo series should
>    remove the main case anyway.
> 
> - The SMT / LLC size limit above. This is not really a hardware
>    state. It depends on nr_running_avg of each process and on
>    aggr_tolerance, so a global file cannot report it. It would need
>    something per process.
> 

I guess we can start with this, if per proc shows disabled. Since
global is somewhat covered. If a need arises, can be added.

> This is a code change, so I would like to keep it out of this
> documentation series for now and look at it as a follow-up.
> 
> Tim
> 

Ack. It is beyond the scope of this series. I had thought of this
since most users would see enabled and expect it to work, only to
realize later it isn't. Also figuring that out needs explicit
tracing.

  reply	other threads:[~2026-12-02  6:22 UTC|newest]

Thread overview: 6+ 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-12-01 17:57   ` Shrikanth Hegde
2026-12-01 23:31     ` Tim Chen
2026-12-02  6:21       ` Shrikanth Hegde [this message]
2026-11-12 18:21 ` [PATCH 2/2] sched/cache: Fix decision matrix comment above can_migrate_llc() Tim Chen

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=66cb54ed-21d6-44e1-80d6-d122abc1d72a@linux.ibm.com \
    --to=sshegde@linux.ibm.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=tim.c.chen@linux.intel.com \
    --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®