lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <518220c4-c749-4def-9b10-65ff6018d9dc@lucifer.local>
Date: Thu, 15 Jan 2026 12:30:36 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linuxppc-dev@...ts.ozlabs.org,
        Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
        linux-doc@...r.kernel.org, virtualization@...ts.linux.dev,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oscar Salvador <osalvador@...e.de>,
        "Liam R. Howlett" <Liam.Howlett@...cle.com>,
        Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
        Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
        Jonathan Corbet <corbet@....net>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jerrin Shaji George <jerrin.shaji-george@...adcom.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
        Eugenio Pérez <eperezma@...hat.com>,
        Zi Yan <ziy@...dia.com>
Subject: Re: [PATCH v2 13/23] mm/balloon_compaction: fold
 balloon_mapping_gfp_mask() into balloon_page_alloc()

On Thu, Jan 15, 2026 at 10:20:03AM +0100, David Hildenbrand (Red Hat) wrote:
> Let's just remove balloon_mapping_gfp_mask().

Yeah... this was silly. :)

>
> Signed-off-by: David Hildenbrand (Red Hat) <david@...nel.org>

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>

> ---
>  include/linux/balloon_compaction.h |  7 -------
>  mm/balloon_compaction.c            | 12 ++++++++----
>  2 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index e5451cf1f6589..d1d4739398978 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -106,13 +106,6 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon,
>  	list_add(&page->lru, &balloon->pages);
>  }
>
> -static inline gfp_t balloon_mapping_gfp_mask(void)
> -{
> -	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION))
> -		return GFP_HIGHUSER_MOVABLE;
> -	return GFP_HIGHUSER;
> -}
> -
>  /*
>   * balloon_page_finalize - prepare a balloon page that was removed from the
>   *			   balloon list for release to the page allocator
> diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
> index 90b2d61a593b7..709c57c00b481 100644
> --- a/mm/balloon_compaction.c
> +++ b/mm/balloon_compaction.c
> @@ -112,10 +112,14 @@ EXPORT_SYMBOL_GPL(balloon_page_list_dequeue);
>   */
>  struct page *balloon_page_alloc(void)
>  {
> -	struct page *page = alloc_page(balloon_mapping_gfp_mask() |
> -				       __GFP_NOMEMALLOC | __GFP_NORETRY |
> -				       __GFP_NOWARN);
> -	return page;
> +	gfp_t gfp_flags = __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN;
> +
> +	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION))
> +		gfp_flags |= GFP_HIGHUSER_MOVABLE;
> +	else
> +		gfp_flags |= GFP_HIGHUSER;
> +
> +	return alloc_page(gfp_flags);
>  }
>  EXPORT_SYMBOL_GPL(balloon_page_alloc);
>
> --
> 2.52.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ