| /linux/tools/testing/selftests/mm/ |
| H A D | mkdirty.c | 64 const size_t mmap_size = 2 * thpsize; in mmap_thp_range() local 67 mmap_mem = mmap(NULL, mmap_size, prot, MAP_PRIVATE|MAP_ANON, in mmap_thp_range() 77 munmap(mmap_mem, mmap_size); in mmap_thp_range() 82 *_mmap_size = mmap_size; in mmap_thp_range() 125 size_t mmap_size; in test_ptrace_write_thp() local 131 mem = mmap_thp_range(PROT_READ, &mmap_mem, &mmap_size); in test_ptrace_write_thp() 155 munmap(mmap_mem, mmap_size); in test_ptrace_write_thp() 193 size_t mmap_size; in test_page_migration_thp() local 197 mem = mmap_thp_range(PROT_READ|PROT_WRITE, &mmap_mem, &mmap_size); in test_page_migration_thp() 226 munmap(mmap_mem, mmap_size); in test_page_migration_thp() [all …]
|
| H A D | hugetlb_madv_vs_map.c | 32 size_t mmap_size; variable 47 madvise(huge_ptr, mmap_size, MADV_DONTNEED); in madv() 62 ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in map_extra() 95 mmap_size = default_huge_page_size(); in main() 98 huge_ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in main() 119 munmap(huge_ptr, mmap_size); in main()
|
| H A D | prctl_thp_disable.c | 43 size_t mmap_size; in test_mmap_thp() local 47 mmap_size = 2 * pmdsize; in test_mmap_thp() 48 mmap_mem = (char *)mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in test_mmap_thp() 71 munmap(mmap_mem, mmap_size); in test_mmap_thp()
|
| H A D | uffd-wp-mremap.c | 60 size_t mmap_size = size * 2; in mmap_aligned() 63 mmap_mem = mmap(NULL, mmap_size, prot, flags, -1, 0); in alloc_one_folio() 69 munmap(mem + size, mmap_mem + mmap_size - mem - size); in alloc_one_folio() 49 size_t mmap_size = size * 2; mmap_aligned() local
|
| H A D | cow.c | 844 size_t size, mmap_size, mremap_size; in do_run_with_thp() 848 mmap_size = 2 * thpsize; in do_run_with_thp() 849 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in do_run_with_thp() 991 munmap(mmap_mem, mmap_size); in run_with_thp_swap() 1579 size_t mmap_size; in run_with_huge_zeropage() 1591 mmap_size = 2 * pmdsize; in run_with_huge_zeropage() 1592 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in run_with_huge_zeropage() 1599 mmap_smem = mmap(NULL, mmap_size, PROT_READ, in run_with_huge_zeropage() 1642 munmap(mmap_mem, mmap_size); in run_with_memfd() 1644 munmap(mmap_smem, mmap_size); in run_with_memfd() 832 size_t size, mmap_size, mremap_size; do_run_with_thp() local 1565 size_t mmap_size; run_with_huge_zeropage() local [all...] |
| /linux/tools/testing/selftests/vfio/ |
| H A D | vfio_dma_mapping_test.c | 207 size_t mmap_size; in FIXTURE() local 235 self->mmap_size = 2 * region_size; in FIXTURE_SETUP() 239 region->vaddr = mmap(NULL, self->mmap_size, PROT_READ | PROT_WRITE, in FIXTURE_SETUP() 257 ASSERT_EQ(munmap(self->region.vaddr, self->mmap_size), 0); in FIXTURE_TEARDOWN() 294 region->size = self->mmap_size; in TEST_F()
|
| /linux/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
| H A D | misc.c | 180 size_t mmap_size; in event_sample_buf_mmap() 189 mmap_size = page_size * (1 + mmap_pages); in event_sample_buf_mmap() 190 buff = mmap(NULL, mmap_size, in event_sample_buf_mmap() 173 size_t mmap_size; event_sample_buf_mmap() local
|
| /linux/tools/perf/util/ |
| H A D | session.c | 3232 prefetch_event(char *buf, u64 head, size_t mmap_size, 3242 if (head + sizeof(event->header) > mmap_size) 3250 if (head + event_size <= mmap_size) 3258 if (event_size <= mmap_size - head % page_size) { 3263 /* Invalid input. Event size should never exceed mmap_size. */ 3264 pr_debug("%s: head=%#" PRIx64 " event->header.size=%#x, mmap_size=%#zx:" 3265 " fuzzed or compressed perf.data?\n", __func__, head, event_size, mmap_size); 3271 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) 3273 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL)); 3277 fetch_decomp_event(u64 head, size_t mmap_size, cha 2157 prefetch_event(char * buf,u64 head,size_t mmap_size,bool needs_swap,union perf_event * error) prefetch_event() argument 2196 fetch_mmaped_event(u64 head,size_t mmap_size,char * buf,bool needs_swap) fetch_mmaped_event() argument 2202 fetch_decomp_event(u64 head,size_t mmap_size,char * buf,bool needs_swap) fetch_decomp_event() argument 2269 size_t mmap_size; global() member [all...] |
| H A D | auxtrace.h | 256 size_t mmap_size; member
|
| H A D | auxtrace.c | 1258 buffer->mmap_size = size; in auxtrace_buffer__put_data() 1269 munmap(buffer->mmap_addr, buffer->mmap_size); in auxtrace_buffer__drop_data() 1271 buffer->mmap_size = 0; in auxtrace_buffer__free()
|
| /linux/tools/testing/selftests/bpf/benchs/ |
| H A D | bench_ringbufs.c | 520 size_t mmap_size; 534 size_t mmap_mask = pb->mmap_size - 1; 467 size_t mmap_size; global() member
|
| /linux/tools/testing/selftests/kvm/lib/ |
| H A D | kvm_util.c | 813 kvm_munmap(region->mmap_start, region->mmap_size); in __vm_mem_region_delete() 816 kvm_munmap(region->mmap_alias, region->mmap_size); in __vm_mem_region_delete() 1039 region->mmap_size = mem_size; in vm_mem_add() 1054 region->mmap_size += alignment; in vm_mem_add() 1058 region->fd = kvm_memfd_alloc(region->mmap_size, in vm_mem_add() 1061 region->mmap_start = kvm_mmap(region->mmap_size, PROT_READ | PROT_WRITE, in vm_mem_add() 1131 region->mmap_alias = kvm_mmap(region->mmap_size, in vm_mem_add()
|
| /linux/tools/testing/selftests/kvm/include/ |
| H A D | kvm_util.h | 47 size_t mmap_size; member
|
| /linux/tools/lib/bpf/ |
| H A D | libbpf.c | 14151 perf_event_read_simple(void *mmap_mem, size_t mmap_size, size_t page_size, in bpf_program__set_attach_target() 14164 ehdr = base + (data_tail & (mmap_size - 1)); in bpf_program__set_attach_target() 14167 if (((void *)ehdr) + ehdr_size > base + mmap_size) { in bpf_program__set_attach_target() 14169 size_t len_first = base + mmap_size - copy_start; in bpf_program__assoc_struct_ops() 14230 size_t mmap_size; in parse_cpu_mask_str() 14244 munmap(cpu_buf->base, pb->mmap_size + pb->page_size)) in parse_cpu_mask_str() 14302 cpu_buf->base = mmap(NULL, pb->mmap_size + pb->page_size, 14436 pb->mmap_size = pb->page_size * page_cnt; in bpf_object__open_subskeleton() 14584 ret = perf_event_read_simple(cpu_buf->base, pb->mmap_size, in bpf_object__destroy_skeleton() 14657 *buf_size = pb->mmap_size; 13571 perf_event_read_simple(void * mmap_mem,size_t mmap_size,size_t page_size,void ** copy_mem,size_t * copy_size,bpf_perf_event_print_t fn,void * private_data) perf_event_read_simple() argument 13650 size_t mmap_size; global() member [all...] |
| /linux/tools/power/x86/turbostat/ |
| H A D | turbostat.c | 10156 size_t mmap_size; in pmt_mmio_open() local 10208 mmap_size = ROUND_UP_TO_PAGE_SIZE(size); in pmt_mmio_open() 10209 mmio = mmap(0, mmap_size, PROT_READ, MAP_SHARED, fd_pmt, 0); in pmt_mmio_open()
|