From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, bp@suse.de
Subject: Re: [RFC PATCH] sched/topology: Introduce NUMA identity node sched domain
Date: Mon, 14 Aug 2017 14:44:59 +0700 [thread overview]
Message-ID: <f85d6d5d-64b7-7e08-939f-b321e5f05949@amd.com> (raw)
In-Reply-To: <20170811091527.wyngvvq2dy3yzik2@hirez.programming.kicks-ass.net>
On 8/11/17 16:15, Peter Zijlstra wrote:
> On Fri, Aug 11, 2017 at 12:58:22PM +0700, Suravee Suthikulpanit wrote:
>>
>>
>> On 8/11/17 11:57, Suravee Suthikulpanit wrote:
>>>
>>>>> [...]
>>>>> @@ -1445,9 +1448,24 @@ void sched_init_numa(void)
>>>>> tl[i] = sched_domain_topology[i];
>>>>>
>>>>> /*
>>>>> + * Ignore the NUMA identity level if it has the same cpumask
>>>>> + * as previous level. This is the case for:
>>>>> + * - System with last-level-cache (MC) sched domain span a NUMA node.
>>>>> + * - System with DIE sched domain span a NUMA node.
>>>>> + *
>>>>> + * Assume all NUMA nodes are identical, so only check node 0.
>>>>> + */
>>>>> + if (!cpumask_equal(sched_domains_numa_masks[0][0], tl[i-1].mask(0)))
>>>>> + tl[i++] = (struct sched_domain_topology_level){
>>>>> + .mask = sd_numa_mask,
>>>>> + .numa_level = 0,
>>>>> + SD_INIT_NAME(NODE)
>>>>> + };
>>>>
>>>> So what you've forgotten to mention is that for those systems where the
>>>> LLC == NODE this now superfluous level gets removed by the degenerate
>>>> code. Have you verified that does the right thing?
>>>
>>> Let me check with that one and get back.
>>
>> Actually, it is not removed by the degenerate code. That is what this logic
>> is for. It checks for LCC == NODE or DIE == NODE before setting up the NODE
>> sched level. I can update the comment. This has also been tested on system
>> w/ LLC == NODE.
>
> Why does the degenerate code fail to remove things?
>
Sorry for confusion. Actually, the degenerate code does remove the duplicate
NODE sched-domain.
The logic above is taking a different approach. Instead of depending on the
degenerate code during cpu_attach_domain() at a later time, it would exclude the
NODE sched-domain during sched_init_numa(). The difference is, without
!cpumask_equal(), now the MC sched-domain would have the SD_PREFER_SIBLING flag
set by the degenerate code since the flag got transferred down from the NODE to
MC sched-domain. Would this be the preferred behavior for MC sched-domain?
Regards,
Suravee
next prev parent reply other threads:[~2017-08-14 7:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 15:20 Suravee Suthikulpanit
2017-08-10 16:41 ` Peter Zijlstra
2017-08-11 4:57 ` Suravee Suthikulpanit
2017-08-11 5:58 ` Suravee Suthikulpanit
2017-08-11 9:15 ` Peter Zijlstra
2017-08-14 7:44 ` Suravee Suthikulpanit [this message]
2017-08-24 1:14 ` Suravee Suthikulpanit
2017-10-02 12:43 ` Peter Zijlstra
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=f85d6d5d-64b7-7e08-939f-b321e5f05949@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®