diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2012-07-31 19:42:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:40 -0400 |
commit | 24669e58477e2752c1fbca9c1c988e9dd0d79d15 (patch) | |
tree | a4fe04fc1cc2b5a2d89b67f745185b9e9640426f /mm/memory.c | |
parent | 972dc4de13f667a7df27ee32573b2e6fc6cc8434 (diff) |
hugetlb: use mmu_gather instead of a temporary linked list for accumulating pages
Use a mmu_gather instead of a temporary linked list for accumulating pages
when we unmap a hugepage range
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 91f69459d3e8..59e5bebc2e35 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1343,8 +1343,11 @@ static void unmap_single_vma(struct mmu_gather *tlb, | |||
1343 | * Since no pte has actually been setup, it is | 1343 | * Since no pte has actually been setup, it is |
1344 | * safe to do nothing in this case. | 1344 | * safe to do nothing in this case. |
1345 | */ | 1345 | */ |
1346 | if (vma->vm_file) | 1346 | if (vma->vm_file) { |
1347 | unmap_hugepage_range(vma, start, end, NULL); | 1347 | mutex_lock(&vma->vm_file->f_mapping->i_mmap_mutex); |
1348 | __unmap_hugepage_range(tlb, vma, start, end, NULL); | ||
1349 | mutex_unlock(&vma->vm_file->f_mapping->i_mmap_mutex); | ||
1350 | } | ||
1348 | } else | 1351 | } else |
1349 | unmap_page_range(tlb, vma, start, end, details); | 1352 | unmap_page_range(tlb, vma, start, end, details); |
1350 | } | 1353 | } |