thp: pte alloc trans splitting
pte alloc routines must wait for split_huge_page if the pmd is not present and not null (i.e. pmd_trans_splitting). The additional branches are optimized away at compile time by pmd_trans_splitting if the config option is off. However we must pass the vma down in order to know the anon_vma lock to wait for. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Rik van Riel <riel@redhat.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
64cc6ae001
commit
8ac1f8320a
@ -50,7 +50,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
|
||||
end = PGDIR_SIZE;
|
||||
offset -= address;
|
||||
do {
|
||||
pte_t * pte = pte_alloc_map(mm, pmd, address);
|
||||
pte_t *pte = pte_alloc_map(mm, NULL, pmd, address);
|
||||
if (!pte)
|
||||
return -ENOMEM;
|
||||
io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space);
|
||||
|
@ -92,7 +92,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
|
||||
end = PGDIR_SIZE;
|
||||
offset -= address;
|
||||
do {
|
||||
pte_t * pte = pte_alloc_map(mm, pmd, address);
|
||||
pte_t *pte = pte_alloc_map(mm, NULL, pmd, address);
|
||||
if (!pte)
|
||||
return -ENOMEM;
|
||||
io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space);
|
||||
|
@ -214,7 +214,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
|
||||
if (pud) {
|
||||
pmd = pmd_alloc(mm, pud, addr);
|
||||
if (pmd)
|
||||
pte = pte_alloc_map(mm, pmd, addr);
|
||||
pte = pte_alloc_map(mm, NULL, pmd, addr);
|
||||
}
|
||||
return pte;
|
||||
}
|
||||
|
Reference in New Issue
Block a user