[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zxc46lMpelf_BKHw@gpd3>
Date: Tue, 22 Oct 2024 07:32:26 +0200
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: introduce LLC awareness to the default idle
selection policy
On Mon, Oct 21, 2024 at 10:01:27AM -1000, Tejun Heo wrote:
> External email: Use caution opening links or attachments
>
>
> Hello,
>
> Overall, I think this is a great idea.
>
> On Mon, Oct 21, 2024 at 09:13:04AM +0200, Andrea Righi wrote:
> ...
> > + /*
> > + * Determine the task's LLC domain.
> > + */
> > + sd = rcu_dereference(per_cpu(sd_llc, prev_cpu));
> > + if (sd)
> > + cpumask_and(llc_cpus, sched_domain_span(sd), p->cpus_ptr);
> > + else
> > + cpumask_copy(llc_cpus, p->cpus_ptr);
>
> However, I wonder whether we can be a bit more efficient here. Always
> copying cpumasks can become noticeable in larger machines. It should be
> possible to cover most common cases without copying cpumasks - e.g. tasks
> which don't have any cpumask restrictions or affine within a single LLC
> (including tasks restricted to one CPU) don't need to compute a new cpumask
> each time. They can use either sched_domain_span() or p->cpus_ptr directly.
I agree, I was also thinking to improve this part to avoid doing the
copy. And I have a few other changes to apply, I'll send a v2 soon.
Thanks!
-Andrea
>
> Thanks.
>
> --
> tejun
Powered by blists - more mailing lists