lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/31] mm/migrate: remove cruft from migration_entry_wait()s
On Tue, 23 May 2023, Alistair Popple wrote:
>
> Hugh Dickins <hughd@google.com> writes:
>
> > migration_entry_wait_on_locked() does not need to take a mapped pte
> > pointer, its callers can do the unmap first. Annotate it with
> > __releases(ptl) to reduce sparse warnings.
>
> Thanks Hugh, I debated doing something similar when I reworked this to
> not take a pageref. However I was unsure if the pte unmap/unlock
> ordering mattered as this reverses the order of operations (from unlock
> then unmap to unmap then unlock).
>
> I never found any reason why that would be a problem though so please
> add:
>
> Reviewed-by: Alistair Popple <apopple@nvidia.com>

Thanks Alistair. Right, the ordering doesn't matter: you might briefly
think that because I'm going to put the rcu_read_unlock() into the
pte_unmap(), that there's something wrong with doing that early; but
you'd quickly realize that holding on to the spinlock is good enough.

Hugh

\
 
 \ /
  Last update: 2023-05-24 03:58    [W:3.399 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site