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

2021-03-02 Thread Alistair Popple
On Tuesday, 2 March 2021 7:52:53 PM AEDT Alistair Popple wrote: > On Saturday, 27 February 2021 2:59:09 AM AEDT Christoph Hellwig wrote: > > > - struct page *page = migration_entry_to_page(entry); > > > + struct page *page = pfn_to_page(swp_offset(entry)); > > > > I wonder if

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

2021-03-02 Thread Alistair Popple
On Saturday, 27 February 2021 2:59:09 AM AEDT Christoph Hellwig wrote: > > - struct page *page = migration_entry_to_page(entry); > > + struct page *page = pfn_to_page(swp_offset(entry)); > > I wonder if keeping a single special_entry_to_page() helper would still > me a useful.

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

2021-03-01 Thread Alistair Popple
On Tuesday, 2 March 2021 4:46:42 AM AEDT Jason Gunthorpe wrote: > > I wish you could come up with a more descriptive word that special > here > > What I understand is this is true when the swap_offset is a pfn? Correct, and that points to a better name. Maybe is_pfn_swap_entry()? In which case

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

2021-03-01 Thread Jason Gunthorpe
On Fri, Feb 26, 2021 at 06:18:25PM +1100, Alistair Popple wrote: > Remove the migration and device private entry_to_page() and > entry_to_pfn() inline functions and instead open code them directly. > This results in shorter code which is easier to understand. > > Signed-off-by: Alistair Popple >

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

2021-02-26 Thread Christoph Hellwig
> - struct page *page = migration_entry_to_page(entry); > + struct page *page = pfn_to_page(swp_offset(entry)); I wonder if keeping a single special_entry_to_page() helper would still me a useful. But I'm not entirely sure. There are also two more open coded copies of

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

2021-02-25 Thread Alistair Popple
Remove the migration and device private entry_to_page() and entry_to_pfn() inline functions and instead open code them directly. This results in shorter code which is easier to understand. Signed-off-by: Alistair Popple --- arch/s390/mm/pgtable.c | 2 +- fs/proc/task_mmu.c | 23