mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm: numa: disable change protection for vma(VM_HUGETLB)
Currently when a process accesses a hugetlb range protected with PROTNONE, unexpected COWs are triggered, which finally puts the hugetlb subsystem into a broken/uncontrollable state, where for example h->resv_huge_pages is subtracted too much and wraps around to a very large number, and the free hugepage pool is no longer maintainable. This patch simply stops changing protection for vma(VM_HUGETLB) to fix the problem. And this also allows us to avoid useless overhead of minor faults. Signed-off-by: Naoya Horiguchi <[email protected]> Suggested-by: Mel Gorman <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: David Rientjes <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ce66b032ad
commit
6b79c57b92
1 changed files with 3 additions and 1 deletions
|
|
@ -2165,8 +2165,10 @@ void task_numa_work(struct callback_head *work)
|
|||
vma = mm->mmap;
|
||||
}
|
||||
for (; vma; vma = vma->vm_next) {
|
||||
if (!vma_migratable(vma) || !vma_policy_mof(vma))
|
||||
if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
|
||||
is_vm_hugetlb_page(vma)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Shared library pages mapped by multiple processes are not
|
||||
|
|
|
|||
Loading…
Reference in a new issue