lkml.org 
[lkml]   [2019]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/hmm: Cleanup hmm_vma_walk_pud()/walk_pud_range()
From
Date
On 12/20/19 4:38 PM, Steven Price wrote:
> There are a number of minor misuses of the page table APIs in
> hmm_vma_walk_pud():
>
> If the pud_trans_huge_lock() hasn't been obtained it might be because
> the PUD is unstable, so we should retry.
>
> If it has been obtained then there's no need for a READ_ONCE, and the
> PUD cannot be pud_none() or !pud_present() so these paths are dead code.
>
> Finally in walk_pud_range(), after a call to split_huge_pud() the code
> should check pud_trans_unstable() rather than pud_none() to decide
> whether the PUD should be retried.
>
> Suggested-by: Thomas Hellström (VMware) <thomas_os@shipmail.org>
> Signed-off-by: Steven Price <steven.price@arm.com>
> ---
> This is based on top of my "Generic page walk and ptdump" series and
> fixes some pre-existing bugs spotted by Thomas.
>
> mm/hmm.c | 16 +++++-----------
> mm/pagewalk.c | 2 +-
> 2 files changed, 6 insertions(+), 12 deletions(-)

LGTM.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>


\
 
 \ /
  Last update: 2019-12-20 16:55    [W:0.062 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site