Re: [PATCH 2/9] mm, page_alloc: calculate pageset high and batch once per zone

From: Vlastimil Babka
Date: Tue Oct 06 2020 - 18:04:05 EST


On 10/5/20 2:52 PM, Michal Hocko wrote:
On Tue 22-09-20 16:37:05, Vlastimil Babka wrote:
We currently call pageset_set_high_and_batch() for each possible cpu, which
repeats the same calculations of high and batch values.

Instead call the function just once per zone, and make it apply the calculated
values to all per-cpu pagesets of the zone.

This also allows removing the zone_pageset_init() and __zone_pcp_update()
wrappers.

No functional change.

Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

I like this. One question below
Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Thanks.

I hope I am not misreading the diff but it seems that setup_zone_pageset
is calling pageset_init which is then done again by
zone_set_pageset_high_and_batch as a part of pageset_update

No, pageset_init() is not called again from there, so must be insufficient diff context giving that impression.