Searched refs:thpsize (Results 1 – 4 of 4) sorted by relevance
| /linux/tools/testing/selftests/mm/ |
| H A D | mkdirty.c | 29 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 D | cow.c | 829 static void do_run_with_thp(test_fn fn, enum thp_run thp_run, size_t thpsize) in do_run_with_thp() argument 836 mmap_size = 2 * thpsize; in do_run_with_thp() 846 mem = (char *)(((uintptr_t)mmap_mem + thpsize) & ~(thpsize - 1)); in do_run_with_thp() 848 ret = madvise(mem, thpsize, MADV_HUGEPAGE); in do_run_with_thp() 860 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in do_run_with_thp() 865 memset(mem, 1, thpsize); in do_run_with_thp() 867 size = thpsize; in do_run_with_thp() 871 assert(thpsize == pmdsize); in do_run_with_thp() 899 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp() 912 mremap_size = thpsize / 2; in do_run_with_thp() [all …]
|
| /linux/mm/ |
| H A D | huge_memory.c | 715 static struct thpsize *thpsize_create(int order, struct kobject *parent) in thpsize_create() 718 struct thpsize *thpsize; in thpsize_create() local 721 thpsize = kzalloc(sizeof(*thpsize), GFP_KERNEL); in thpsize_create() 722 if (!thpsize) in thpsize_create() 725 thpsize->order = order; in thpsize_create() 727 ret = kobject_init_and_add(&thpsize->kobj, &thpsize_ktype, parent, in thpsize_create() 730 kfree(thpsize); in thpsize_create() 735 ret = sysfs_add_group(&thpsize->kobj, &any_ctrl_attr_grp); in thpsize_create() 739 ret = sysfs_add_group(&thpsize->kobj, &any_stats_attr_grp); in thpsize_create() 744 ret = sysfs_add_group(&thpsize->kobj, &anon_ctrl_attr_grp); in thpsize_create() [all …]
|
| /linux/include/linux/ |
| H A D | huge_mm.h | 315 struct thpsize { struct 321 #define to_thpsize(kobj) container_of(kobj, struct thpsize, kobj) argument
|