Re: [PATCH v3 1/8] mm: Remove special swap entry functions
From: Alistair Popple <apopple@nvidia.com>
Date: 2021-03-02 12:35:40
Also in:
dri-devel, lkml, nouveau
From: Alistair Popple <apopple@nvidia.com>
Date: 2021-03-02 12:35:40
Also in:
dri-devel, lkml, nouveau
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:quoted
quoted
- 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 this in the THP migration code.I think it might be if only to clearly document where these entries are
used.
Will add it for the next version to see what it looks like.
Actually the main advantage ends up being that it becomes easy to retain the page locked check for migration entries. - Alistair