[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0d648083-2664-f99c-f1d7-4655e66b3a5b@shipmail.org>
Date: Fri, 20 Dec 2019 16:54:52 +0100
From: Thomas Hellström (VMware)
<thomas_os@...pmail.org>
To: Steven Price <steven.price@....com>,
Jérôme Glisse <jglisse@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm/hmm: Cleanup hmm_vma_walk_pud()/walk_pud_range()
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@...pmail.org>
> Signed-off-by: Steven Price <steven.price@....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@...are.com>
Powered by blists - more mailing lists