lkml.org 
[lkml]   [2016]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mm: thp: split_huge_pmd_address() comment improvement
On Fri, May 06, 2016 at 05:04:00PM +0200, Andrea Arcangeli wrote:
> Comment is partly wrong, this improves it by including the case of
> split_huge_pmd_address() called by try_to_unmap_one if
> TTU_SPLIT_HUGE_PMD is set.
>
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

> ---
> mm/huge_memory.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 9086793..1fbe13d 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -3031,8 +3031,10 @@ void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address,
> return;
>
> /*
> - * Caller holds the mmap_sem write mode, so a huge pmd cannot
> - * materialize from under us.
> + * Caller holds the mmap_sem write mode or the anon_vma lock,
> + * so a huge pmd cannot materialize from under us (khugepaged
> + * holds both the mmap_sem write mode and the anon_vma lock
> + * write mode).
> */
> __split_huge_pmd(vma, pmd, address, freeze);
> }

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2016-05-06 20:01    [W:0.327 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site