From: Tim Chen <tim.c.chen@linux.intel.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Qais Yousef <qyousef@layalina.io>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Valentin Schneider <vschneid@redhat.com>,
Madadi Vineeth Reddy <vineethr@linux.ibm.com>,
Jianyong Wu <jianyong.wu@outlook.com>,
Yangyu Chen <cyy@cyyself.name>,
Tingyin Duan <tingyin.duan@gmail.com>,
Vern Hao <vernhao@tencent.com>, Vern Hao <haoxing990@gmail.com>,
Len Brown <len.brown@intel.com>, Aubrey Li <aubrey.li@intel.com>,
Zhao Liu <zhao1.liu@intel.com>, Chen Yu <yu.chen.surf@gmail.com>,
Chen Yu <yu.c.chen@intel.com>,
Adam Li <adamli@os.amperecomputing.com>,
Aaron Lu <ziqianlu@bytedance.com>,
Tim Chen <tim.c.chen@intel.com>, Josh Don <joshdon@google.com>,
Luo Gengkun <luogengkun2@huawei.com>,
Gavin Guo <gavinguo@igalia.com>, Yi Lai <yi1.lai@intel.com>,
Ricardo Neri <ricardo.neri@intel.com>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [RFC PATCH 0/7] sched/cache: Per-task control of cache aware scheduling via prctl
Date: Thu, 10 Sep 2026 16:28:34 -0700 [thread overview]
Message-ID: <bc2b92b6c9d0d63123adb9f5a2e29b6ec193792f.camel@linux.intel.com> (raw)
In-Reply-To: <f0b6a0c3-4fa6-4f8c-99a0-a3c1a73507f3@linux.ibm.com>
On Wed, 2026-09-09 at 18:27 +0530, Shrikanth Hegde wrote:
> Hi Tim/Peter.
>
> I have been trying to catch up. I still have to read
> and might have missed some conversation details. So please
> bear with me for silly questions.
Thanks for taking a look. You questions are helpful for
providing the context of why this series was proposed.
>
> On 8/29/26 3:59 AM, Tim Chen wrote:
> > Hi all,
> >
> > Cache aware scheduling today groups tasks by their mm: the LLC aggregation
> > target lives in mm_struct, so the address space is the unit of grouping.
> > That works, but in some scenarios that is too coarse and too eager, and the
> > only knob we have over it is a single system-wide debugfs switch.
> >
> > It's too coarse because plenty of workloads share data across cooperating
> > *processes* rather than threads - a database with a process per connection,
> > a browser with a renderer per site, a server and its worker helpers. They
> > pass data through shm or pipes and would love to be pulled onto the same
> > LLC, but they never share an mm, so today they can't be. And it's too eager
> > in the other direction: a process whose threads don't actually share
> > anything gets aggregated anyway, just because they happen to sit in one
> > address space.
> >
> > So the core idea of this series is simple: allow other groupings than
> > the mm, make the grouping an object in its own right, and let user space
> > say "put these tasks together" explicitly.
>
> So, As you said, this is effectively asking user to make the decision.
By default, tasks are grouped by process and that make sense in many cases.
But sometimes the users have information about task characteristics that they wish to group
tasks in other ways.
In our discussions with Vern Hao from Tencent, they have multiple processes
in their workload, where some tasks in a process is responsible for
database access, some for encryption, and some dealing with disk access.
Those tasks across processes with similar function share more data than
tasks in a process for their applications.
Another scenario is grouping processes with shared memory together.
>
> But what tools do user space have today to make effective decisions?
As in the example above, this is for users who know about their workload
characteristics and wish to group their tasks in other way than the default
process grouping.
Also if people identify via perf c2c that tasks
> Application changes could turn out to be tricky to do and how an
> application developer will know whether to group them together or not?
> What's guidance there?
No changes is required on application. An admin or a separate daemon
can use prctl to group tasks together by sepcifying the pids pair of tasks
to be grouped. Please see the PR_SCHED_CACHE_SHARE_FROM operation in
patch 7 of the documentation.
>
> Can the grouping be done post the application started running?
> Like any option that says these pid's are to be bundled into one group?
Yes.
>
> I remember you guys discussed about cgroup and decided it is not a good option.
> That argument is still holds?
I think there is no strong case to support that tasks sharing
data necessarily belong in a cgroup. Using cgroup wouldn't cover all the use cases
we want. With the proposed prctl based interface in this series,
the administrator can easily group the processes in a cgroup together
if that makes sense. We also would rather not disturb the cgroup
interface unnecessarily.
Tim
prev parent reply other threads:[~2026-09-10 23:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 22:29 Tim Chen
2026-08-28 22:29 ` [RFC PATCH 1/7] sched/cache: Decouple sched_cache_group from mm Tim Chen
2026-08-28 22:29 ` [RFC PATCH 2/7] sched/cache: Introduce task_struct->sched_cache_grp Tim Chen
2026-08-28 22:29 ` [RFC PATCH 3/7] sched/cache: Extract sched_cache_alloc_group() helper Tim Chen
2026-08-28 22:29 ` [RFC PATCH 4/7] sched/cache: Add prctl to manage per process cache scheduling groups Tim Chen
2026-08-28 22:29 ` [RFC PATCH 5/7] sched/cache: Allow a process to enable cache aware scheduling via prctl Tim Chen
2026-08-28 22:29 ` [RFC PATCH 6/7] sched/cache: Extend the enabled debugfs to more modes Tim Chen
2026-08-28 22:29 ` [RFC PATCH 7/7] sched/cache: Documentation: document the PR_SCHED_CACHE prctl Tim Chen
2026-08-29 9:27 ` [RFC PATCH 0/7] sched/cache: Per-task control of cache aware scheduling via prctl Peter Zijlstra
2026-08-31 14:39 ` Chen Yu
2026-08-31 17:04 ` Tim Chen
2026-09-09 12:57 ` Shrikanth Hegde
2026-09-10 23:28 ` 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=bc2b92b6c9d0d63123adb9f5a2e29b6ec193792f.camel@linux.intel.com \
--to=tim.c.chen@linux.intel.com \
--cc=adamli@os.amperecomputing.com \
--cc=aubrey.li@intel.com \
--cc=cyy@cyyself.name \
--cc=dietmar.eggemann@arm.com \
--cc=gavinguo@igalia.com \
--cc=haoxing990@gmail.com \
--cc=jianyong.wu@outlook.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=len.brown@intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luogengkun2@huawei.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=ricardo.neri@intel.com \
--cc=sshegde@linux.ibm.com \
--cc=tim.c.chen@intel.com \
--cc=tingyin.duan@gmail.com \
--cc=vernhao@tencent.com \
--cc=vincent.guittot@linaro.org \
--cc=vineethr@linux.ibm.com \
--cc=vschneid@redhat.com \
--cc=yi1.lai@intel.com \
--cc=yu.c.chen@intel.com \
--cc=yu.chen.surf@gmail.com \
--cc=zhao1.liu@intel.com \
--cc=ziqianlu@bytedance.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®