/linux-6.1.9/tools/testing/selftests/vm/ |
D | soft-dirty.c | 15 static void test_simple(int pagemap_fd, int pagesize) in test_simple() argument 27 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_simple() 36 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_simple() 48 static void test_vma_reuse(int pagemap_fd, int pagesize) in test_vma_reuse() argument 57 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_vma_reuse() 69 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map2) == 1, in test_vma_reuse() 77 static void test_hugepage(int pagemap_fd, int pagesize) in test_hugepage() argument 99 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_hugepage() 108 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_hugepage() 124 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument [all …]
|
D | split_huge_page_test.c | 143 int pagemap_fd; in split_pte_mapped_thp() local 150 pagemap_fd = open(pagemap_proc, O_RDONLY); in split_pte_mapped_thp() 152 if (pagemap_fd == -1) { in split_pte_mapped_thp() 196 is_backed_by_thp(&pte_mapped[i], pagemap_fd, kpageflags_fd)) in split_pte_mapped_thp() 216 is_backed_by_thp(&pte_mapped[i], pagemap_fd, kpageflags_fd)) in split_pte_mapped_thp() 227 close(pagemap_fd); in split_pte_mapped_thp()
|
D | transhuge-stress.c | 34 int pagemap_fd; in main() local 63 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in main() 64 if (pagemap_fd < 0) in main() 90 pfn = allocate_transhuge(p, pagemap_fd); in main()
|
D | util.h | 41 static inline int64_t allocate_transhuge(void *ptr, int pagemap_fd) in allocate_transhuge() argument 57 if (pread(pagemap_fd, ent, sizeof(ent), in allocate_transhuge()
|
D | ksm_tests.c | 460 int pagemap_fd, n_normal_pages, n_huge_pages; in ksm_merge_hugepages_time() local 476 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in ksm_merge_hugepages_time() 477 if (pagemap_fd < 0) in ksm_merge_hugepages_time() 483 if (allocate_transhuge(p, pagemap_fd) < 0) in ksm_merge_hugepages_time()
|
D | userfaultfd.c | 1466 int pagemap_fd; in userfaultfd_pagemap_test() local 1499 pagemap_fd = pagemap_open(); in userfaultfd_pagemap_test() 1504 value = pagemap_read_vaddr(pagemap_fd, area_dst); in userfaultfd_pagemap_test() 1518 value = pagemap_read_vaddr(pagemap_fd, area_dst); in userfaultfd_pagemap_test() 1526 value = pagemap_read_vaddr(pagemap_fd, area_dst); in userfaultfd_pagemap_test() 1531 value = pagemap_read_vaddr(pagemap_fd, area_dst); in userfaultfd_pagemap_test() 1534 close(pagemap_fd); in userfaultfd_pagemap_test()
|
/linux-6.1.9/tools/testing/selftests/kvm/ |
D | access_tracking_perf_test.c | 97 static uint64_t lookup_pfn(int pagemap_fd, struct kvm_vm *vm, uint64_t gva) in lookup_pfn() argument 103 entry = pread_uint64(pagemap_fd, "pagemap", hva / getpagesize()); in lookup_pfn() 138 int pagemap_fd; in mark_vcpu_memory_idle() local 147 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in mark_vcpu_memory_idle() 148 TEST_ASSERT(pagemap_fd > 0, "Failed to open pagemap."); in mark_vcpu_memory_idle() 152 uint64_t pfn = lookup_pfn(pagemap_fd, vm, gva); in mark_vcpu_memory_idle() 195 close(pagemap_fd); in mark_vcpu_memory_idle()
|
/linux-6.1.9/tools/vm/ |
D | page-types.c | 186 static int pagemap_fd; variable 307 return do_u64_read(pagemap_fd, "/proc/pid/pagemap", buf, index, pages); in pagemap_read() 902 pagemap_fd = checked_open(buf, O_RDONLY); in parse_pid() 1087 pagemap_fd = checked_open("/proc/self/pagemap", O_RDONLY); in walk_page_cache() 1103 close(pagemap_fd); in walk_page_cache()
|