Lines Matching full:pagesize

34 static size_t pagesize;  variable
46 return __builtin_ctzll(size / pagesize); in sz2ord()
67 kb = (pagesize >> 10) << i; in detect_thp_sizes()
102 for (; size; addr += pagesize, size -= pagesize) in range_is_swapped()
718 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in do_run_with_base_page()
725 ret = madvise(mem, pagesize, MADV_NOHUGEPAGE); in do_run_with_base_page()
733 memset(mem, 0, pagesize); in do_run_with_base_page()
736 madvise(mem, pagesize, MADV_PAGEOUT); in do_run_with_base_page()
743 fn(mem, pagesize); in do_run_with_base_page()
745 munmap(mem, pagesize); in do_run_with_base_page()
800 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in do_run_with_thp()
819 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_run_with_thp()
824 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_run_with_thp()
836 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp()
841 size = pagesize; in do_run_with_thp()
869 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTFORK); in do_run_with_thp()
883 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DOFORK); in do_run_with_thp()
1209 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_test_anon_thp_collapse()
1214 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_test_anon_thp_collapse()
1441 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in run_with_zeropage()
1448 smem = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); in run_with_zeropage()
1458 fn(mem, smem, pagesize); in run_with_zeropage()
1460 munmap(mem, pagesize); in run_with_zeropage()
1462 munmap(smem, pagesize); in run_with_zeropage()
1511 if (!pagemap_is_populated(pagemap_fd, mem + pagesize) || in run_with_huge_zeropage()
1512 !pagemap_is_populated(pagemap_fd, smem + pagesize)) { in run_with_huge_zeropage()
1538 if (fallocate(fd, 0, 0, pagesize)) { in run_with_memfd()
1544 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in run_with_memfd()
1549 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_memfd()
1559 fn(mem, smem, pagesize); in run_with_memfd()
1561 munmap(mem, pagesize); in run_with_memfd()
1563 munmap(smem, pagesize); in run_with_memfd()
1589 if (fallocate(fd, 0, 0, pagesize)) { in run_with_tmpfile()
1595 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in run_with_tmpfile()
1600 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_tmpfile()
1610 fn(mem, smem, pagesize); in run_with_tmpfile()
1612 munmap(mem, pagesize); in run_with_tmpfile()
1614 munmap(smem, pagesize); in run_with_tmpfile()
1743 pagesize = getpagesize(); in main()