Commit bc1e3097 authored by Johannes Weiner's avatar Johannes Weiner Committed by Suren Baghdasaryan
Browse files

BACKPORT: mm: page_alloc: batch vmstat updates in expand()

expand() currently updates vmstat for every subpage.  This is unnecessary,
since they're all of the same zone and migratetype.

Count added pages locally, then do a single vmstat update.

Link: https://lkml.kernel.org/r/20240327190111.GC7597@cmpxchg.org


Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

Bug: 406708503
(cherry picked from commit 883dd161)
[skipped replacing add_to_free_list with __add_to_free_list, This modification has already been included in 3578319.]
Change-Id: I435b8146b68e4b6fb80b88c4a0339aae6ca20cda
Signed-off-by: default avataryipeng xiang <yipengxiang@honor.corp-partner.google.com>
parent 3dc79460
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment