diff options
| author | Ryan Roberts <[email protected]> | 2025-03-18 17:43:41 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-03-22 05:03:16 +0000 |
| commit | a2c6f9c3cafac02a48db83714f4b62fee2508bc3 (patch) | |
| tree | ba1840f738fe01284f757ce5e36ee372597e621c /samples/rust/rust_driver_pci.rs | |
| parent | selftests/mm: uffd-unit-tests support for hugepages > 2M (diff) | |
| download | kernel-a2c6f9c3cafac02a48db83714f4b62fee2508bc3.tar.gz kernel-a2c6f9c3cafac02a48db83714f4b62fee2508bc3.zip | |
selftests/mm: speed up split_huge_page_test
create_pagecache_thp_and_fd() was previously writing a file sized at twice
the PMD size by making a per-byte write syscall. This was quite slow when
the PMD size is 4M, but completely intolerable for 32M (PMD size for
arm64's 16K page size), and 512M (PMD size for arm64's 64K page size).
The byte pattern has a 256 byte period, so let's create a 1K buffer and
fill it with exactly 4 periods. Then we can write the buffer as many
times as is required to fill the file. This makes things much more
tolerable.
The test now passes for 16K page size. It still fails for 64K page size
because MAX_PAGECACHE_ORDER is too small for 512M folio size (I think).
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ryan Roberts <[email protected]>
Acked-by: Peter Xu <[email protected]>
Acked-by: Rafael Aquini <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'samples/rust/rust_driver_pci.rs')
0 files changed, 0 insertions, 0 deletions
