lkml.org 
[lkml]   [2017]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 01/14] mm: thp: make __split_huge_pmd_locked visible.
Date
On Sun, Feb 05, 2017 at 11:12:39AM -0500, Zi Yan wrote:
> From: Zi Yan <ziy@nvidia.com>
>
> It allows splitting huge pmd while you are holding the pmd lock.
> It is prepared for future zap_pmd_range() use.
>
> Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
> ---
> include/linux/huge_mm.h | 2 ++
> mm/huge_memory.c | 22 ++++++++++++----------
> 2 files changed, 14 insertions(+), 10 deletions(-)
>
...
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 03e4566fc226..cd66532ef667 100644
...
> @@ -2036,10 +2039,9 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
> clear_page_mlock(page);
> } else if (!pmd_devmap(*pmd))
> goto out;
> - __split_huge_pmd_locked(vma, pmd, haddr, freeze);
> + __split_huge_pmd_locked(vma, pmd, address, freeze);

Could you explain what is intended on this change?
If some caller (f.e. wp_huge_pmd?) could call __split_huge_pmd() with
address not aligned with pmd border, __split_huge_pmd_locked() results in
triggering VM_BUG_ON(haddr & ~HPAGE_PMD_MASK).

Thanks,
Naoya Horiguchi

> out:
> spin_unlock(ptl);
> - mmu_notifier_invalidate_range_end(mm, haddr, haddr + HPAGE_PMD_SIZE);
> }
>
> void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address,
> --
> 2.11.0
>

\
 
 \ /
  Last update: 2017-02-06 07:20    [W:2.140 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site