All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zenghui Yu <zenghui.yu@linux.dev>
To: "John J. Coleman" <jocolema@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, david@kernel.org, liam@infradead.org,
	ljs@kernel.org, mhocko@suse.com, peterx@redhat.com,
	rppt@kernel.org, surenb@google.com, vbabka@kernel.org,
	audra@redhat.com
Subject: Re: [PATCH] selftests/mm: allocate nr_pages based on pmd size for uffd pmd_move tests
Date: Wed, 18 Nov 2026 12:09:01 +0800	[thread overview]
Message-ID: <38118330-5cd6-4f32-9098-a3d07cc7b3cf@linux.dev> (raw)
In-Reply-To: <20261113040045.1439391-1-jocolema@redhat.com>

Hi John,

On 11/13/26 12:00 PM, John J. Coleman wrote:
> When executing the uffd-unit-test, the "move-pmd on anon" test will fail
> on aarch64+64k with a segmentation fault because the initial allocated
> memory region is too small.  This only happens with the move-pmd* tests
> because the architecture base page size is still utilized even though the
> memory region is specific to the size indicated by the pmd.
> 
> Patch 9f5c2aec3388 ("selftests/mm: fix uffd move-pmd test crash on 64K
> base page systems") implements an initial fix to the segmentation fault
> by skipping the test if the allocated memory region is not large enough
> for the number of pages x page size requested.  Since this will skip over
> the aarch64+64k pmd tests, this patch is intended to resolve the problem
> with 64k pages by pre-allocating the memory region with 2x the pmd page
> size (for area_src and area_dst) for only the move_pmd tests by using the
> uffd_test_case_ops pre_alloc hook.
> 
> Link: https://lore.kernel.org/all/20261103202049.499206-1-jocolema@redhat.com
> 
> Fixes: a2bf6a9ca805 ("selftests/mm: add UFFDIO_MOVE ioctl test")
> 
> Signed-off-by: John J. Coleman <jocolema@redhat.com>

Thanks for chasing it. I've tested mm-new (which already contains this
patch) on my 64k-page-size box.

Before this patch:

 ok 14 # SKIP move-pmd on anon (chunk size does not fit in the test area)
 ok 15 # SKIP move-pmd-huge-zeropage on anon (not enough pages for one PMD-sized move)
 ok 16 # SKIP move-pmd-split on anon (chunk size does not fit in the test area)

After this patch:

 ok 14 move-pmd on anon
 ok 15 move-pmd-huge-zeropage on anon
 ok 16 move-pmd-split on anon

So,

Tested-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>

Thanks,
Zenghui


      parent reply	other threads:[~2026-11-18  4:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  4:00 [PATCH] selftests/mm: allocate nr_pages based on pmd size for uffd pmd_move tests John J. Coleman
2026-11-14  4:01 ` sashiko-bot
2026-11-14 18:44   ` Andrew Morton
2026-11-15 15:30     ` John J. Coleman
2026-11-18  4:09 ` Zenghui Yu [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=38118330-5cd6-4f32-9098-a3d07cc7b3cf@linux.dev \
    --to=zenghui.yu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=audra@redhat.com \
    --cc=david@kernel.org \
    --cc=jocolema@redhat.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.