From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: "Zengtao (B)" <prime.zeng@hisilicon.com>,
Valentin Schneider <valentin.schneider@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Linuxarm <linuxarm@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations conflicts with lower layer
Date: Mon, 13 Jan 2020 13:22:17 +0100 [thread overview]
Message-ID: <06aa5fef-9b72-0f6d-9070-831a0c9b8db0@arm.com> (raw)
In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED340E420D@DGGEMM506-MBX.china.huawei.com>
On 13.01.20 13:08, Zengtao (B) wrote:
>> -----Original Message-----
>> From: Valentin Schneider [mailto:valentin.schneider@arm.com]
>> Sent: Monday, January 13, 2020 7:17 PM
>> To: Zengtao (B); Morten Rasmussen
>> Cc: Sudeep Holla; Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki;
>> linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations
>> conflicts with lower layer
>>
>> On 13/01/2020 06:51, Zengtao (B) wrote:
>>> I have tried both, this previous one don't work. But this one seems
>> work
>>> correctly with the warning message printout as expected.
>>>
>>
>> Thanks for trying it out.
>>
>>> This patch is based on the fact " non-NUMA spans shouldn't overlap ",
>> I am
>>> not quite sure if this is always true?
>>>
>>
>> I think this is required for get_group() to work properly. Otherwise,
>> successive get_group() calls may override (and break) the sd->groups
>> linking as you initially reported.
>>
>> In your example, for MC level we have
>>
>> tl->mask(3) == 3-7
>> tl->mask(4) == 4-7
>>
>> Which partially overlaps, causing the relinking of '7->3' to '7->4'. Valid
>> configurations would be
>>
>> wholly disjoint:
>> tl->mask(3) == 0-3
>> tl->maks(4) == 4-7
>>
>> equal:
>> tl->mask(3) == 3-7
>> tl->mask(4) == 3-7
>>
>>> Anyway, Could you help to raise the new patch?
>>>
>>
>> Ideally I'd like to be able to reproduce this locally first (TBH I'd like
>> to get my first suggestion to work since it's less intrusive). Could you
>> share how you were able to trigger this? Dietmar's been trying to
>> reproduce
>> this with qemu but I don't think he's there just yet.
>
> Do you have got a hardware platform with clusters?what's the hardware
> Cpu topology?
I can test this with:
sudo qemu-system-aarch64 -kernel ./Image -hda ./qemu-image-aarch64.img
-append 'root=/dev/vda console=ttyAMA0 loglevel=8 sched_debug' -smp
cores=8 --nographic -m 512 -cpu cortex-a53 -machine virt -numa
node,cpus=0-2,nodeid=0 -numa node,cpus=3-7,nodeid=1
and
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 1eb81f113786..e941a402e5f1 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -465,6 +465,9 @@ void update_siblings_masks(unsigned int cpuid)
if (cpuid_topo->package_id != cpu_topo->package_id)
continue;
+ if ((cpu < 4 && cpuid > 3) || (cpu > 3 && cpuid < 4))
+ continue;
+
cpumask_set_cpu(cpuid, &cpu_topo->core_sibling);
cpumask_set_cpu(cpu, &cpuid_topo->core_sibling);
on mainline qemu. I do need the hack in update_siblings_masks() since
the topology detection via -smp cores=X, sockets=Y doesn't work yet.
next prev parent reply other threads:[~2020-01-13 12:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 8:16 [PATCH] cpu-topology: warn if NUMA configurations conflicts with lower layer z00214469
2019-12-31 16:40 ` Sudeep Holla
2020-01-02 3:05 ` Zengtao (B)
2020-01-02 11:29 ` Sudeep Holla
2020-01-02 12:47 ` Zengtao (B)
2020-01-02 13:22 ` Valentin Schneider
2020-01-02 19:30 ` Dietmar Eggemann
2020-01-03 4:24 ` Zengtao (B)
2020-01-03 10:57 ` Valentin Schneider
2020-01-03 12:14 ` Valentin Schneider
2020-01-03 17:20 ` Dietmar Eggemann
2020-01-06 1:48 ` Zengtao (B)
2020-01-06 14:31 ` Dietmar Eggemann
2020-01-08 2:19 ` Zengtao (B)
2020-01-09 11:05 ` Morten Rasmussen
2020-01-09 12:07 ` Dietmar Eggemann
2020-01-06 1:52 ` Zengtao (B)
2020-01-03 11:40 ` Sudeep Holla
2020-01-06 1:37 ` Zengtao (B)
2020-01-09 10:43 ` Morten Rasmussen
2020-01-09 12:58 ` Zengtao (B)
2020-01-11 20:56 ` Valentin Schneider
2020-01-13 6:51 ` Zengtao (B)
2020-01-13 11:16 ` Valentin Schneider
2020-01-13 12:08 ` Zengtao (B)
2020-01-13 12:22 ` Dietmar Eggemann [this message]
2020-01-13 14:49 ` Dietmar Eggemann
2020-01-13 15:15 ` Valentin Schneider
2020-01-09 10:52 ` Morten Rasmussen
2020-01-12 13:22 ` Valentin Schneider
2020-01-13 13:22 ` Morten Rasmussen
2020-01-02 13:59 ` Sudeep Holla
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=06aa5fef-9b72-0f6d-9070-831a0c9b8db0@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=morten.rasmussen@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=valentin.schneider@arm.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;
as well as URLs for NNTP newsgroup(s).