mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hongfu Li <hongfu.li@linux.dev>
To: Hugh Dickins <hughd@google.com>,
	David Hildenbrand <david@kernel.org>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Muchun Song <muchun.song@linux.dev>,
	Oscar Salvador <osalvador@suse.de>
Cc: hongfu.li@linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  Hongfu Li <lihongfu@kylinos.cn>
Subject: [PATCH 0/2] mm/memfd: drop stale hugetlb allocation mask handling
Date: Tue, 17 Nov 2026 18:53:10 +0800	[thread overview]
Message-ID: <20261117-for-memfd-v1-0-fa68f433171e@kylinos.cn> (raw)

The hugetlb allocation mask computed in memfd_alloc_folio() no longer has
an effect. The call site only dequeues folios from the hugetlb pool, so
the mask selects neither a zone nor a migratetype any more. Remove it,
along with the gfp_mask argument it feeds into
alloc_hugetlb_folio_reserve().

Patch 1 drops the redundant narrowing. Patch 2 drops the gfp_mask
argument of alloc_hugetlb_folio_reserve(), whose only caller passes
exactly htlb_alloc_mask(h), and derives that mask inside the helper
instead.

---
Hongfu Li (2):
      mm/memfd: drop redundant hugetlb allocation mask narrowing
      mm/hugetlb: remove the gfp_mask argument from alloc_hugetlb_folio_reserve()

 include/linux/hugetlb.h |  4 ++--
 mm/hugetlb.c            |  3 ++-
 mm/memfd.c              | 14 +-------------
 3 files changed, 5 insertions(+), 16 deletions(-)
---
base-commit: 0bce4c3c7589a80b09a4f21fcb41811cca5153a1
change-id: 20261117-for-memfd-e11675edfe65

Best regards,
--  
Hongfu Li <lihongfu@kylinos.cn>


             reply	other threads:[~2026-11-17 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 10:53 Hongfu Li [this message]
2026-11-17 10:53 ` [PATCH 1/2] mm/memfd: drop redundant hugetlb allocation mask narrowing Hongfu Li
2026-11-17 10:53 ` [PATCH 2/2] mm/hugetlb: remove the gfp_mask argument from alloc_hugetlb_folio_reserve() Hongfu Li
2026-11-17 11:15   ` Muchun Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117-for-memfd-v1-0-fa68f433171e@kylinos.cn \
    --to=hongfu.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=hughd@google.com \
    --cc=lihongfu@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®