Re: [Patch v3] mm/page_alloc: add same penalty is enough to get round-robin order

David Hildenbrand
2022-04-12T07:46:16Z

On 12.04.22 02:13, 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. Since we just increase a constance of 1 to node
> penalty, it is not necessary to multiply MAX_NODE_LOAD for preference.
>
> [vbabka@suse.cz: suggests to remove MAX_NODE_LOAD]
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> CC: Vlastimil Babka <vbabka@suse.cz>
> CC: David Hildenbrand <david@redhat.com>
> CC: Oscar Salvador <osalvador@suse.de>
> ---
> v3: merge into a single patch
> v2: adjust constant penalty to 1
> ---

Acked-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb