Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/balloon_compaction: fold balloon_mapping_gfp_mask() into balloon_page_alloc()

Let's just remove balloon_mapping_gfp_mask().

Link: https://lkml.kernel.org/r/20260119230133.3551867-15-david@kernel.org
Signed-off-by: David Hildenbrand (Red Hat) <david@kernel.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Eugenio Pérez <eperezma@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: SeongJae Park <sj@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand (Red Hat) and committed by
Andrew Morton
9d792ef3 0fa3e9a4

+8 -11
-7
include/linux/balloon_compaction.h
··· 106 106 list_add(&page->lru, &balloon->pages); 107 107 } 108 108 109 - static inline gfp_t balloon_mapping_gfp_mask(void) 110 - { 111 - if (IS_ENABLED(CONFIG_BALLOON_COMPACTION)) 112 - return GFP_HIGHUSER_MOVABLE; 113 - return GFP_HIGHUSER; 114 - } 115 - 116 109 /* 117 110 * balloon_page_finalize - prepare a balloon page that was removed from the 118 111 * balloon list for release to the page allocator
+8 -4
mm/balloon_compaction.c
··· 112 112 */ 113 113 struct page *balloon_page_alloc(void) 114 114 { 115 - struct page *page = alloc_page(balloon_mapping_gfp_mask() | 116 - __GFP_NOMEMALLOC | __GFP_NORETRY | 117 - __GFP_NOWARN); 118 - return page; 115 + gfp_t gfp_flags = __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN; 116 + 117 + if (IS_ENABLED(CONFIG_BALLOON_COMPACTION)) 118 + gfp_flags |= GFP_HIGHUSER_MOVABLE; 119 + else 120 + gfp_flags |= GFP_HIGHUSER; 121 + 122 + return alloc_page(gfp_flags); 119 123 } 120 124 EXPORT_SYMBOL_GPL(balloon_page_alloc); 121 125