Messages in this thread | | | Subject | Re: [PATCH] mm/hmm: Cleanup hmm_vma_walk_pud()/walk_pud_range() | From | Thomas Hellström (VMware) <> | Date | Fri, 20 Dec 2019 16:54:52 +0100 |
| |
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>
| |