Home
last modified time | relevance | path

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

/linux-6.12.1/tools/testing/selftests/mm/
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 …]
Dcow.c799 static void do_run_with_thp(test_fn fn, enum thp_run thp_run, size_t thpsize) in do_run_with_thp() argument
806 mmap_size = 2 * thpsize; in do_run_with_thp()
815 mem = (char *)(((uintptr_t)mmap_mem + thpsize) & ~(thpsize - 1)); in do_run_with_thp()
817 ret = madvise(mem, thpsize, MADV_HUGEPAGE); in do_run_with_thp()
828 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in do_run_with_thp()
832 memset(mem, 0, thpsize); in do_run_with_thp()
834 size = thpsize; in do_run_with_thp()
838 assert(thpsize == pmdsize); in do_run_with_thp()
864 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp()
876 mremap_size = thpsize / 2; in do_run_with_thp()
[all …]
/linux-6.12.1/mm/
Dhuge_memory.c683 static struct thpsize *thpsize_create(int order, struct kobject *parent) in thpsize_create()
686 struct thpsize *thpsize; in thpsize_create() local
689 thpsize = kzalloc(sizeof(*thpsize), GFP_KERNEL); in thpsize_create()
690 if (!thpsize) in thpsize_create()
693 thpsize->order = order; in thpsize_create()
695 ret = kobject_init_and_add(&thpsize->kobj, &thpsize_ktype, parent, in thpsize_create()
698 kfree(thpsize); in thpsize_create()
703 ret = sysfs_add_group(&thpsize->kobj, &any_ctrl_attr_grp); in thpsize_create()
707 ret = sysfs_add_group(&thpsize->kobj, &any_stats_attr_grp); in thpsize_create()
712 ret = sysfs_add_group(&thpsize->kobj, &anon_ctrl_attr_grp); in thpsize_create()
[all …]
/linux-6.12.1/include/linux/
Dhuge_mm.h313 struct thpsize { struct
319 #define to_thpsize(kobj) container_of(kobj, struct thpsize, kobj) argument