Home
last modified time | relevance | path

Searched refs:thpsize (Results 1 – 4 of 4) sorted by relevance

/linux/tools/testing/selftests/mm/
H A Dmkdirty.c29 static size_t thpsize; variable
64 const size_t mmap_size = 2 * thpsize; in mmap_thp_range()
73 mem = (char *)(((uintptr_t)mmap_mem + thpsize) & ~(thpsize - 1)); in mmap_thp_range()
75 if (madvise(mem, thpsize, MADV_HUGEPAGE)) { in mmap_thp_range()
148 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_ptrace_write_thp()
206 if (mprotect(mem, thpsize, PROT_READ)) { in test_page_migration_thp()
212 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_page_migration_thp()
218 if (syscall(__NR_mbind, mem, thpsize, MPOL_LOCAL, NULL, 0x7fful, in test_page_migration_thp()
245 if (mprotect(mem, thpsize, PROT_READ)) { in test_pte_mapped_thp()
251 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_pte_mapped_thp()
[all …]
H A Dcow.c841 static void do_run_with_thp(test_fn fn, enum thp_run thp_run, size_t thpsize) in do_run_with_thp() argument
848 mmap_size = 2 * thpsize; in do_run_with_thp()
858 mem = (char *)(((uintptr_t)mmap_mem + thpsize) & ~(thpsize - 1)); in do_run_with_thp()
860 ret = madvise(mem, thpsize, MADV_HUGEPAGE); in do_run_with_thp()
872 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in do_run_with_thp()
877 memset(mem, 1, thpsize); in do_run_with_thp()
879 size = thpsize; in do_run_with_thp()
883 assert(thpsize == pmdsize); in do_run_with_thp()
911 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp()
924 mremap_size = thpsize / 2; in do_run_with_thp()
[all …]
/linux/mm/
H A Dhuge_memory.c718 static struct thpsize *thpsize_create(int order, struct kobject *parent) in thpsize_create()
721 struct thpsize *thpsize; in thpsize_create() local
724 thpsize = kzalloc_obj(*thpsize); in thpsize_create()
725 if (!thpsize) in thpsize_create()
728 thpsize->order = order; in thpsize_create()
730 ret = kobject_init_and_add(&thpsize->kobj, &thpsize_ktype, parent, in thpsize_create()
733 kfree(thpsize); in thpsize_create()
738 ret = sysfs_add_group(&thpsize->kobj, &any_ctrl_attr_grp); in thpsize_create()
742 ret = sysfs_add_group(&thpsize->kobj, &any_stats_attr_grp); in thpsize_create()
747 ret = sysfs_add_group(&thpsize->kobj, &anon_ctrl_attr_grp); in thpsize_create()
[all …]
/linux/include/linux/
H A Dhuge_mm.h315 struct thpsize { struct
321 #define to_thpsize(kobj) container_of(kobj, struct thpsize, kobj) argument