mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Qi Zheng <qi.zheng@linux.dev>
Cc: muchun.song@linux.dev, osalvador@suse.de, david@kernel.org,
	azpijr@gmail.com, lance.yang@linux.dev, fvdl@google.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Qi Zheng <zhengqi.arch@bytedance.com>
Subject: Re: [PATCH v5 0/3] mm: hugetlb: fix CMA-related issues
Date: Thu, 19 Nov 2026 00:43:39 -0800	[thread overview]
Message-ID: <20261119004339.98c7e39ba863695691c7b921@linux-foundation.org> (raw)
In-Reply-To: <cover.1794907279.git.zhengqi.arch@bytedance.com>

On Tue, 17 Nov 2026 17:33:56 +0800 Qi Zheng <qi.zheng@linux.dev> wrote:

> This series fixes three CMA-related issues in HugeTLB reservation,
> long-term pinning and allocation:
> 
>  - Avoid ineffective CMA reservations on 32-bit x86 kernels running on
>    CPUs that advertise 1 GiB page support.
>  - Allow long-term pins of explicitly CMA-allocated HugeTLB folios,
>    which already own the CMA memory.
>  - Preserve the caller's GFP mask when allocating from CMA.

I fed this into LLM-driven testbot, both confirmatory and adversarial
testing.  All looks good.

Tested-by: Andrew Morton <akpm@linux-foundation.org>


: Tested the three-patch mm: hugetlb: fix CMA-related issues v5
: series before and after applying it. The 32-bit boots covered non-PAE
: and PAE kernels. The 64-bit tests used a two-node VM with 12 GiB of
: RAM and CMA-backed 1 GiB HugeTLB pages.
: 
: 1. x86: hugetlb: disable default CMA reservations on 32-bit kernel
: 
: Without the series, non-PAE boot warned and reserved an unusable
: 64 MiB CMA area. A PAE boot also reserved an unusable 1 GiB area.
: With the series, both kernels rejected hugetlb_cma= and reserved
: neither area.
: 
: 2. mm: gup: allow long-term pins of CMA-allocated HugeTLB folios
: 
: A long-term pin of a HugeTLB page allocated from CMA failed with
: ENOMEM before the series and succeeded afterward. As a negative
: control, I found an ordinary anonymous page inside CMA on each
: kernel. Long-term pinning migrated it out of CMA before succeeding
: on both. The change did not permit pinning that borrowed page in
: place.
: 
: 3. mm: hugetlb: fix GFP mask propagation to CMA
: 
: On a preferred-node allocation, the caller cleared
: __GFP_DIRECT_RECLAIM. CMA received it set before the series and
: clear afterward. I then exhausted node 0's CMA area: further 1 GiB
: pages fell back to node 1 on both kernels, and a fourth fault raised
: SIGBUS after both areas were full. The fallback's reclaim-enabled
: mask reached CMA on both kernels.
: 
: Allocation latency and general memory-pressure behavior were not
: measured.


      parent reply	other threads:[~2026-11-19  8:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  9:33 Qi Zheng
2026-11-17  9:33 ` [PATCH v5 1/3] x86: hugetlb: disable default CMA reservations on 32-bit kernel Qi Zheng
2026-11-17  9:33 ` [PATCH v5 2/3] mm: gup: allow long-term pins of CMA-allocated HugeTLB folios Qi Zheng
2026-11-17  9:43   ` David Hildenbrand (Arm)
2026-11-17  9:33 ` [PATCH v5 3/3] mm: hugetlb: fix GFP mask propagation to CMA Qi Zheng
2026-11-19  8:43 ` Andrew Morton [this message]

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=20261119004339.98c7e39ba863695691c7b921@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=azpijr@gmail.com \
    --cc=david@kernel.org \
    --cc=fvdl@google.com \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=qi.zheng@linux.dev \
    --cc=zhengqi.arch@bytedance.com \
    /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®