Re: [Nouveau] [PATCH v8 1/8] mm: Remove special swap entry functions

2021-05-18 Thread Peter Xu
On Tue, May 18, 2021 at 09:58:09PM +1000, Alistair Popple wrote: > On Tuesday, 18 May 2021 12:17:32 PM AEST Peter Xu wrote: > > On Wed, Apr 07, 2021 at 06:42:31PM +1000, Alistair Popple wrote: > > > +static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) > > > +{ > > > + struct

Re: [Nouveau] [PATCH v8 1/8] mm: Remove special swap entry functions

2021-05-18 Thread Alistair Popple
On Tuesday, 18 May 2021 12:17:32 PM AEST Peter Xu wrote: > On Wed, Apr 07, 2021 at 06:42:31PM +1000, Alistair Popple wrote: > > +static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) > > +{ > > + struct page *p = pfn_to_page(swp_offset(entry)); > > + > > + /* > > + *

Re: [Nouveau] [PATCH v8 1/8] mm: Remove special swap entry functions

2021-05-17 Thread Peter Xu
On Wed, Apr 07, 2021 at 06:42:31PM +1000, Alistair Popple wrote: > +static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) > +{ > + struct page *p = pfn_to_page(swp_offset(entry)); > + > + /* > + * Any use of migration entries may only occur while the > + *

[Nouveau] [PATCH v8 1/8] mm: Remove special swap entry functions

2021-04-07 Thread Alistair Popple
Remove multiple similar inline functions for dealing with different types of special swap entries. Both migration and device private swap entries use the swap offset to store a pfn. Instead of multiple inline functions to obtain a struct page for each swap entry type use a common function