|
@@ -29,6 +29,7 @@
|
|
#include <linux/mmu_notifier.h>
|
|
#include <linux/mmu_notifier.h>
|
|
#include <linux/perf_event.h>
|
|
#include <linux/perf_event.h>
|
|
#include <linux/audit.h>
|
|
#include <linux/audit.h>
|
|
|
|
+#include <linux/khugepaged.h>
|
|
|
|
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/cacheflush.h>
|
|
#include <asm/cacheflush.h>
|
|
@@ -815,6 +816,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
|
|
end, prev->vm_pgoff, NULL);
|
|
end, prev->vm_pgoff, NULL);
|
|
if (err)
|
|
if (err)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
+ khugepaged_enter_vma_merge(prev);
|
|
return prev;
|
|
return prev;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -833,6 +835,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
|
|
next->vm_pgoff - pglen, NULL);
|
|
next->vm_pgoff - pglen, NULL);
|
|
if (err)
|
|
if (err)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
+ khugepaged_enter_vma_merge(area);
|
|
return area;
|
|
return area;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1761,6 +1764,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
vma_unlock_anon_vma(vma);
|
|
vma_unlock_anon_vma(vma);
|
|
|
|
+ khugepaged_enter_vma_merge(vma);
|
|
return error;
|
|
return error;
|
|
}
|
|
}
|
|
#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */
|
|
#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */
|
|
@@ -1808,6 +1812,7 @@ static int expand_downwards(struct vm_area_struct *vma,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
vma_unlock_anon_vma(vma);
|
|
vma_unlock_anon_vma(vma);
|
|
|
|
+ khugepaged_enter_vma_merge(vma);
|
|
return error;
|
|
return error;
|
|
}
|
|
}
|
|
|
|
|