aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2011-01-13 18:46:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 20:32:43 -0500
commitb15d00b6af617251cc70a908df983e9aff57e169 (patch)
tree0fd28ef8d3705505d5b84d495875e3837698b540 /mm/mmap.c
parentba76149f47d8c939efa0acc07a191237af900471 (diff)
thp: khugepaged vma merge
register in khugepaged if the vma grows. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 50a4aa0255a..753f44d1704 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -29,6 +29,7 @@
29#include <linux/mmu_notifier.h> 29#include <linux/mmu_notifier.h>
30#include <linux/perf_event.h> 30#include <linux/perf_event.h>
31#include <linux/audit.h> 31#include <linux/audit.h>
32#include <linux/khugepaged.h>
32 33
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
34#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
@@ -815,6 +816,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
815 end, prev->vm_pgoff, NULL); 816 end, prev->vm_pgoff, NULL);
816 if (err) 817 if (err)
817 return NULL; 818 return NULL;
819 khugepaged_enter_vma_merge(prev);
818 return prev; 820 return prev;
819 } 821 }
820 822
@@ -833,6 +835,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
833 next->vm_pgoff - pglen, NULL); 835 next->vm_pgoff - pglen, NULL);
834 if (err) 836 if (err)
835 return NULL; 837 return NULL;
838 khugepaged_enter_vma_merge(area);
836 return area; 839 return area;
837 } 840 }
838 841
@@ -1761,6 +1764,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
1761 } 1764 }
1762 } 1765 }
1763 vma_unlock_anon_vma(vma); 1766 vma_unlock_anon_vma(vma);
1767 khugepaged_enter_vma_merge(vma);
1764 return error; 1768 return error;
1765} 1769}
1766#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ 1770#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */
@@ -1808,6 +1812,7 @@ static int expand_downwards(struct vm_area_struct *vma,
1808 } 1812 }
1809 } 1813 }
1810 vma_unlock_anon_vma(vma); 1814 vma_unlock_anon_vma(vma);
1815 khugepaged_enter_vma_merge(vma);
1811 return error; 1816 return error;
1812} 1817}
1813 1818