Re: [PATCH v3 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

2021-03-03 Thread Alistair Popple
On Tuesday, 2 March 2021 3:10:49 AM AEDT Jason Gunthorpe wrote: > > + while (page_vma_mapped_walk()) { > > + /* > > +* If the page is mlock()d, we cannot swap it out. > > +* If it's recently referenced (perhaps page_referenced > > +

Re: [PATCH v3 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

2021-03-01 Thread Jason Gunthorpe
On Fri, Feb 26, 2021 at 06:18:27PM +1100, Alistair Popple wrote: > The behaviour of try_to_unmap_one() is difficult to follow because it > performs different operations based on a fairly large set of flags used > in different combinations. > > TTU_MUNLOCK is one such flag. However it is

Re: [PATCH v3 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

2021-02-26 Thread Christoph Hellwig
> + while (page_vma_mapped_walk()) { > + /* > + * If the page is mlock()d, we cannot swap it out. > + * If it's recently referenced (perhaps page_referenced > + * skipped over this mm) then we should reactivate it. > + */ > +

[PATCH v3 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

2021-02-25 Thread Alistair Popple
The behaviour of try_to_unmap_one() is difficult to follow because it performs different operations based on a fairly large set of flags used in different combinations. TTU_MUNLOCK is one such flag. However it is exclusively used by try_to_munlock() which specifies no other flags. Therefore