On Thu, Jan 22, 2026 at 08:26:29AM +0530, K Prateek Nayak wrote:
> Hello Peter,
>
> On 1/21/2026 9:46 PM, Peter Zijlstra wrote:
> > On Tue, Jan 20, 2026 at 11:32:38AM +0000, K Prateek Nayak wrote:
> >
> >> "sd->shared" is only allocated for the topmost SD_SHARE_LLC domain and
> >> the topology layer uses the sched domain degeneration path to pass the
> >> reference to the final "sd_llc" domain.
> >
> > I'm fairly sure we've had patches that introduced it for other levels at
> > various times, but clearly none of those ever made it.
> >
> > Anyway, a quick peek seems to suggest it is still easy to extend.
> >
> >
> >> include/linux/sched/topology.h | 1 -
> >> kernel/sched/fair.c | 62 +++++++-----------
> >> kernel/sched/sched.h | 2 +-
> >> kernel/sched/topology.c | 111 ++++++++++++++++++++++-----------
> >> 4 files changed, 101 insertions(+), 75 deletions(-)
> >
> > Is this really worth the extra lines though?
>
> The larger plan was to move the "nohz.idle_cpus" tracking into the
> sched_domain_shared instance which will bloat these allocations.
>
> Instead of (#CPUs x #topology_levels) surplus, most of which will get
> reclaimed at the end anyways, we'll only have #CPUs worth of
> allocations now.
Fair enough I suppose. Be sure to call this out as the primary reason
for doing this.