]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - mm/page_isolation.c
mm, page_alloc: move draining pcplists to page isolation users
authorVlastimil Babka <vbabka@suse.cz>
Tue, 15 Dec 2020 03:10:56 +0000 (19:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:43 +0000 (12:13 -0800)
commit7612921f2376d51d020ae2f06ffb7da40422b75b
tree9ad69648279abc90b408aa470e03a77da5daffb8
parent952eaf815925f106eb6b68346b3458a68bb18ec1
mm, page_alloc: move draining pcplists to page isolation users

Currently, pcplists are drained during set_migratetype_isolate() which
means once per pageblock processed start_isolate_page_range().  This is
somewhat wasteful.  Moreover, the callers might need different guarantees,
and the draining is currently prone to races and does not guarantee that
no page from isolated pageblock will end up on the pcplist after the
drain.

Better guarantees are added by later patches and require explicit actions
by page isolation users that need them.  Thus it makes sense to move the
current imperfect draining to the callers also as a preparation step.

Link: https://lkml.kernel.org/r/20201111092812.11329-7-vbabka@suse.cz
Suggested-by: David Hildenbrand <david@redhat.com>
Suggested-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c
mm/page_alloc.c
mm/page_isolation.c