Re: [PATCH v2 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:19PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Introduce "pud_t pud" in the function, so the code won't dereference *pudp > multiple time. Not only because that looks less straightforward, but also > because if the dereference really happened, it's not

[PATCH v2 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2024-01-03 Thread peterx
From: Peter Xu Introduce "pud_t pud" in the function, so the code won't dereference *pudp multiple time. Not only because that looks less straightforward, but also because if the dereference really happened, it's not clear whether there can be race to see different *pudp values if it's being