Home
last modified time | relevance | path

Searched refs:pmdsize (Results 1 – 3 of 3) sorted by relevance

/linux/tools/testing/selftests/mm/
H A Dprctl_thp_disable.c40 static int test_mmap_thp(enum thp_collapse_type madvise_buf, size_t pmdsize) in test_mmap_thp() argument
47 mmap_size = 2 * pmdsize; in test_mmap_thp()
54 mem = (char *)(((uintptr_t)mmap_mem + pmdsize) & ~(pmdsize - 1)); in test_mmap_thp()
57 madvise(mem, pmdsize, MADV_HUGEPAGE); in test_mmap_thp()
59 madvise(mem, pmdsize, MADV_NOHUGEPAGE); in test_mmap_thp()
62 memset(mem, 1, pmdsize); in test_mmap_thp()
65 madvise(mem, pmdsize, MADV_COLLAPSE); in test_mmap_thp()
68 mprotect(mem, pmdsize, PROT_READ); in test_mmap_thp()
70 ret = check_huge_anon(mem, pmdsize, 1, pmdsize); in test_mmap_thp()
76 size_t pmdsize, in prctl_thp_disable_completely_test() argument
[all …]
H A Dmigration.c225 uint64_t pmdsize; variable
232 pmdsize = read_pmd_pagesize();
233 if (!pmdsize)
236 ptr = mmap(NULL, 2 * pmdsize, PROT_READ | PROT_WRITE,
240 ptr = (uint64_t *) ALIGN((uintptr_t) ptr, pmdsize);
241 ASSERT_EQ(madvise(ptr, pmdsize, MADV_HUGEPAGE), 0);
242 memset(ptr, 0xde, pmdsize);
258 uint64_t pmdsize; variable
266 pmdsize = read_pmd_pagesize();
267 if (!pmdsize)
[all …]
H A Dcow.c36 static size_t pmdsize; variable
52 if (!pmdsize) in detect_thp_sizes()
55 orders = 1UL << sz2ord(pmdsize, pagesize); in detect_thp_sizes()
883 assert(thpsize == pmdsize); in do_run_with_thp()
1226 settings.hugepages[sz2ord(pmdsize, pagesize)].enabled = THP_NEVER; in run_anon_test_case()
1230 if (size == pmdsize) { in run_anon_test_case()
1264 if (pmdsize) in tests_per_anon_test_case()
1492 if (!pmdsize) in run_anon_thp_test_cases()
1501 do_run_with_thp(test_case->fn, THP_RUN_PMD, pmdsize); in run_anon_thp_test_cases()
1507 return pmdsize ? 1 : 0; in tests_per_anon_thp_test_case()
[all …]