From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
David Dai <david.dai@linux.dev>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-7.4] sched_ext: cid: Represent clusters explicitly
Date: Sat, 26 Sep 2026 09:23:15 -1000 [thread overview]
Message-ID: <23db458c1526966f521d41322ab47056@kernel.org> (raw)
In-Reply-To: <20260926152306.3190774-1-arighi@nvidia.com>
Hello, Andrea.
On Sat, Sep 26, 2026 at 05:23:06PM +0200, Andrea Righi wrote:
> - set @cluster_cid to the LLC's own CID when no cluster level exists,
> - set @cluster_idx to -1 when no cluster level exists,
The other levels are inclusive: a level that doesn't exist for a cpu is
represented by the level below it, the way a core on a non-SMT machine is
just the cpu. Can we do the same here? A core without a cluster level is
its own cluster, cluster_cid = core_cid with a dense cluster_idx. Then
every cluster is a contiguous cid range, cluster_idx indexes per-cluster
arrays without a -1 special case, and cluster_cid can't alias between a
real cluster and the fallback cpus in the same LLC.
> + s32 cluster_cid;
> + s32 cluster_idx;
Growing struct scx_cid_topo breaks existing binaries: scx_bpf_cid_topo()
copies out the kernel's sizeof into a buffer the program sized from its
own vmlinux.h. I'm changing the kfunc to take the buffer size and copy the
smaller of the two, filling the rest with -1, and routing that through
for-7.3-fixes so that it lands before any growth. Can you base the next
version on top of it and append the new fields at the end of the struct?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-09-26 19:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 15:23 Andrea Righi
2026-09-26 19:23 ` Tejun Heo [this message]
2026-09-26 19:58 ` Andrea Righi
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=23db458c1526966f521d41322ab47056@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=david.dai@linux.dev \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.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®