TO RESET: Add kernel argument to toggle on-demand paging for hugetlbfs map
Change-Id: Id748e0a2afc4ea59142fedb652a15b4007c5dee4
This commit is contained in:
@ -283,7 +283,7 @@ int hugefileobj_create(struct memobj *memobj, size_t len, off_t off,
|
||||
obj->pgsize);
|
||||
|
||||
#ifdef ENABLE_FUGAKU_HACKS
|
||||
{
|
||||
if (!hugetlbfs_on_demand) {
|
||||
int pgind;
|
||||
int npages;
|
||||
|
||||
|
||||
@ -69,4 +69,7 @@ static inline int page_is_multi_mapped(struct page *page)
|
||||
|
||||
/* Should we take page faults on ANONYMOUS mappings? */
|
||||
extern int anon_on_demand;
|
||||
#ifdef ENABLE_FUGAKU_HACKS
|
||||
extern int hugetlbfs_on_demand;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
10
kernel/mem.c
10
kernel/mem.c
@ -63,6 +63,9 @@ extern int interrupt_from_user(void *);
|
||||
struct tlb_flush_entry tlb_flush_vector[IHK_TLB_FLUSH_IRQ_VECTOR_SIZE];
|
||||
|
||||
int anon_on_demand = 0;
|
||||
#ifdef ENABLE_FUGAKU_HACKS
|
||||
int hugetlbfs_on_demand;
|
||||
#endif
|
||||
int sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
|
||||
|
||||
static struct ihk_mc_pa_ops *pa_ops;
|
||||
@ -2041,6 +2044,13 @@ void mem_init(void)
|
||||
anon_on_demand = 1;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FUGAKU_HACKS
|
||||
if (find_command_line("hugetlbfs_on_demand")) {
|
||||
kprintf("Demand paging on hugetlbfs mappings enabled.\n");
|
||||
hugetlbfs_on_demand = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Init distance vectors */
|
||||
numa_distances_init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user