Home
last modified time | relevance | path

Searched refs:pagemap_fd (Results 1 – 12 of 12) sorted by relevance

/linux-6.6.21/tools/testing/selftests/mm/
Dsoft-dirty.c15 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
102 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_hugepage()
111 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_hugepage()
127 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument
[all …]
Dsplit_huge_page_test.c143 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()
Duffd-unit-tests.c354 int pagemap_fd; in uffd_wp_unpopulated_test() local
360 pagemap_fd = pagemap_open(); in uffd_wp_unpopulated_test()
364 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_unpopulated_test()
369 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_unpopulated_test()
376 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_unpopulated_test()
381 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_unpopulated_test()
400 int pagemap_fd; in uffd_wp_fork_test_common() local
407 pagemap_fd = pagemap_open(); in uffd_wp_fork_test_common()
412 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_fork_test_common()
443 value = pagemap_get_entry(pagemap_fd, area_dst); in uffd_wp_fork_test_common()
[all …]
Dmkdirty.c31 static int pagemap_fd; variable
148 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_ptrace_write_thp()
212 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_page_migration_thp()
251 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_pte_mapped_thp()
348 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in main()
349 if (pagemap_fd < 0) in main()
Dtranshuge-stress.c34 int pagemap_fd; in main() local
66 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in main()
67 if (pagemap_fd < 0) in main()
95 pfn = allocate_transhuge(p, pagemap_fd); in main()
Dksm_functional_tests.c36 static int pagemap_fd; variable
49 pfn_a = pagemap_get_pfn(pagemap_fd, addr + offs_a); in range_maps_duplicates()
56 pfn_b = pagemap_get_pfn(pagemap_fd, addr + offs_b); in range_maps_duplicates()
560 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in main()
561 if (pagemap_fd < 0) in main()
Dcow.c34 static int pagemap_fd; variable
69 if (!pagemap_is_swapped(pagemap_fd, addr)) in range_is_swapped()
703 if (!pagemap_is_swapped(pagemap_fd, mem)) { in do_run_with_base_page()
766 if (!pagemap_is_populated(pagemap_fd, mem + pagesize)) { in do_run_with_thp()
1454 if (!pagemap_is_populated(pagemap_fd, mem + pagesize) || in run_with_huge_zeropage()
1455 !pagemap_is_populated(pagemap_fd, smem + pagesize)) { in run_with_huge_zeropage()
1699 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in main()
1700 if (pagemap_fd < 0) in main()
Dvm_util.c153 int64_t allocate_transhuge(void *ptr, int pagemap_fd) in allocate_transhuge() argument
169 if (pread(pagemap_fd, ent, sizeof(ent), in allocate_transhuge()
Dvm_util.h45 int64_t allocate_transhuge(void *ptr, int pagemap_fd);
Dksm_tests.c556 int pagemap_fd, n_normal_pages, n_huge_pages; in ksm_merge_hugepages_time() local
572 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in ksm_merge_hugepages_time()
573 if (pagemap_fd < 0) in ksm_merge_hugepages_time()
579 if (allocate_transhuge(p, pagemap_fd) < 0) in ksm_merge_hugepages_time()
/linux-6.6.21/tools/testing/selftests/kvm/
Daccess_tracking_perf_test.c95 static uint64_t lookup_pfn(int pagemap_fd, struct kvm_vm *vm, uint64_t gva) in lookup_pfn() argument
101 entry = pread_uint64(pagemap_fd, "pagemap", hva / getpagesize()); in lookup_pfn()
136 int pagemap_fd; in mark_vcpu_memory_idle() local
145 pagemap_fd = open("/proc/self/pagemap", O_RDONLY); in mark_vcpu_memory_idle()
146 TEST_ASSERT(pagemap_fd > 0, "Failed to open pagemap."); in mark_vcpu_memory_idle()
150 uint64_t pfn = lookup_pfn(pagemap_fd, vm, gva); in mark_vcpu_memory_idle()
198 close(pagemap_fd); in mark_vcpu_memory_idle()
/linux-6.6.21/tools/mm/
Dpage-types.c184 static int pagemap_fd; variable
305 return do_u64_read(pagemap_fd, "/proc/pid/pagemap", buf, index, pages); in pagemap_read()
898 pagemap_fd = checked_open(buf, O_RDONLY); in parse_pid()
1083 pagemap_fd = checked_open("/proc/self/pagemap", O_RDONLY); in walk_page_cache()
1099 close(pagemap_fd); in walk_page_cache()