selftests/mm: make file-backed THP split work by writing PMD size data
authorZi Yan <ziy@nvidia.com>
Wed, 22 Jan 2025 16:19:26 +0000 (11:19 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:05:56 +0000 (22:05 -0700)
commit035a112e5fd5b93a1d34c5d736bb515b2f9fa52f
tree821d8780e8cb3f4c561f37ec3210f11fc7570c7e
parent5f6084f95bc1f0a0b95e58e49be1ee74b01f5144
selftests/mm: make file-backed THP split work by writing PMD size data

Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs")
changes huge=always to allocate THP/mTHP based on write size and
split_huge_page_test does not write PMD size data, so file-back THP is not
created during the test.  Fix it by writing PMD size data.

Link: https://lkml.kernel.org/r/20250122161928.1240637-1-ziy@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Yang Shi <yang@os.amperecomputing.com>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/split_huge_page_test.c