disable demand paging on ANONYMOUS mappings unless anon_on_demand kernel argument is passed

This commit is contained in:
Balazs Gerofi
2015-09-14 17:26:37 +09:00
parent 69f4b0e1ad
commit e1a01803d0
3 changed files with 12 additions and 1 deletions

View File

@ -56,6 +56,8 @@ extern int ihk_mc_pt_print_pte(struct page_table *pt, void *virt);
struct tlb_flush_entry tlb_flush_vector[IHK_TLB_FLUSH_IRQ_VECTOR_SIZE];
int anon_on_demand = 0;
static void reserve_pages(unsigned long start, unsigned long end, int type)
{
if (start < pa_start) {
@ -681,6 +683,11 @@ void mem_init(void)
/* Prepare the kernel virtual map space */
virtual_allocator_init();
if (find_command_line("anon_on_demand")) {
kprintf("Demand paging on ANONYMOUS mappings enabled.\n");
anon_on_demand = 1;
}
}
struct location {