From: Wei Yang <richard.weiyang@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Wei Yang <richard.weiyang@gmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/page_alloc: add same penalty is enough to get round-robin order
Date: Wed, 6 Apr 2022 23:47:54 +0000 [thread overview]
Message-ID: <20220406234754.4vpi5sjztcsusqiq@master> (raw)
In-Reply-To: <c56564cd-87f0-25c8-bb78-2bb8d8ad2655@suse.cz>
On Tue, Apr 05, 2022 at 07:11:12PM +0200, Vlastimil Babka wrote:
>On 1/23/22 02:35, Wei Yang wrote:
>> To make node order in round-robin in the same distance group, we add a
>> penalty to the first node we got in each round.
>>
>> To get a round-robin order in the same distance group, we don't need to
>> decrease the penalty since:
>>
>> * find_next_best_node() always iterates node in the same order
>> * distance matters more then penalty in find_next_best_node()
>> * in nodes with the same distance, the first one would be picked up
>>
>> So it is fine to increase same penalty when we get the first node in the
>> same distance group.
>
>With that logic I'm not even sure if we need nr_online_nodes as penalty or
>it could be just 1. Would you know?
Yes, it has the same effect.
[ 0.031849] Fallback order for Node 0: 0 1 2 3 4 5 6 7
[ 0.031854] Fallback order for Node 1: 1 2 3 0 5 6 7 4
[ 0.031857] Fallback order for Node 2: 2 3 0 1 6 7 4 5
[ 0.031860] Fallback order for Node 3: 3 0 1 2 7 4 5 6
[ 0.031864] Fallback order for Node 4: 4 5 6 7 0 1 2 3
[ 0.031867] Fallback order for Node 5: 5 6 7 4 1 2 3 0
[ 0.031870] Fallback order for Node 6: 6 7 4 5 2 3 0 1
[ 0.031873] Fallback order for Node 7: 7 4 5 6 3 0 1 2
Do you prefer to set it to 1?
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2022-04-06 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-23 1:35 [PATCH 1/2] mm/page_alloc: add same penalty is enough to get round-robin order Wei Yang
2022-01-23 1:35 ` [PATCH 2/2] mm/page_alloc: add penalty to local_node Wei Yang
2022-03-21 21:17 ` [PATCH 1/2] mm/page_alloc: add same penalty is enough to get round-robin order Andrew Morton
2022-03-26 15:48 ` Wei Yang
2022-04-05 17:11 ` Vlastimil Babka
2022-04-06 23:47 ` Wei Yang [this message]
2022-04-07 9:53 ` Vlastimil Babka
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=20220406234754.4vpi5sjztcsusqiq@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
/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).