From: Valentin Schneider <vschneid@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>,
aubrey.li@linux.intel.com, efault@gmx.de, gautham.shenoy@amd.com,
linux-kernel@vger.kernel.org, mgorman@techsingularity.net,
mingo@kernel.org, song.bao.hua@hisilicon.com,
srikar@linux.vnet.ibm.com, valentin.schneider@arm.com,
vincent.guittot@linaro.org
Subject: Re: [PATCH v7] sched/fair: Consider cpu affinity when allowing NUMA imbalance in find_idlest_group
Date: Fri, 10 Jun 2022 17:25:34 +0100 [thread overview]
Message-ID: <xhsmho7z07af5.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <YqNR+y5I/3UeVa/g@hirez.programming.kicks-ass.net>
On 10/06/22 16:15, Peter Zijlstra wrote:
> On Fri, Jun 10, 2022 at 11:55:37AM +0100, Valentin Schneider wrote:
>>
>> IIUC we want to pay special attention when the task isn't allowed to run on
>> all online CPUs, wouldn't the below do that?
>>
>> !cpumask_subset(cpu_online_mask, p->cpus_ptr)
>
> At that point we might just as well do the whole cpumask_and() thing,
> no? There's not much cost difference between these two operations.
>
Yeah, you got a point there.
>> The task affinity can be a superset of the online mask, obvious case is
>> init_task's CPU_MASK_ALL, and the above test is still false if both masks
>> are equal.
>>
>> (Additionnaly we could add a step in sched_init() to "properly" initialize
>> the init_task mask and remove the NR_CPUS faff).
>
> I'm confused, NR_CPUS is the right value for CPU_MASK_ALL.
Right, I meant to make the mask match cpu_online_mask from the get go, but
now that I allocate a few more neurons thinking about it it looks like a
can of worms; we'd have to do that after smp_init() to see which CPUs we
actually onlined, and by then we have already forked around.
next prev parent reply other threads:[~2022-06-10 16:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 11:12 [PATCH v7] sched/fair: Consider cpu affinity when allowing NUMA imbalance in find_idlest_group K Prateek Nayak
2022-05-12 6:11 ` K Prateek Nayak
2022-06-09 11:54 ` Peter Zijlstra
2022-06-10 10:55 ` Valentin Schneider
2022-06-10 14:15 ` Peter Zijlstra
2022-06-10 14:42 ` Vincent Guittot
2022-06-10 15:01 ` Peter Zijlstra
2022-06-10 16:25 ` Valentin Schneider [this message]
2022-06-13 12:05 ` K Prateek Nayak
2022-06-13 8:43 ` [tip: sched/core] sched/fair: Consider CPU affinity when allowing NUMA imbalance in find_idlest_group() tip-bot2 for K Prateek Nayak
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=xhsmho7z07af5.mognet@vschneid.remote.csb \
--to=vschneid@redhat.com \
--cc=aubrey.li@linux.intel.com \
--cc=efault@gmx.de \
--cc=gautham.shenoy@amd.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=song.bao.hua@hisilicon.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
/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