mbox series

[0/2] mm: remove page_rmapping()

Message ID 20230630121310.165700-1-zhangpeng362@huawei.com (mailing list archive)
Headers show
Series mm: remove page_rmapping() | expand

Message

Peng Zhang June 30, 2023, 12:13 p.m. UTC
From: ZhangPeng <zhangpeng362@huawei.com>

This minor patch series remove page_rmapping() and convert the last user
fault_dirty_shared_page() to use a folio.

ZhangPeng (2):
  mm: remove page_rmapping()
  mm: use a folio in fault_dirty_shared_page()

 include/linux/mm.h |  1 -
 mm/memory.c        | 10 +++++-----
 mm/util.c          |  6 ------
 3 files changed, 5 insertions(+), 12 deletions(-)

Comments

Matthew Wilcox June 30, 2023, 9:39 p.m. UTC | #1
On Fri, Jun 30, 2023 at 08:13:08PM +0800, Peng Zhang wrote:
> From: ZhangPeng <zhangpeng362@huawei.com>
> 
> This minor patch series remove page_rmapping() and convert the last user
> fault_dirty_shared_page() to use a folio.

This patch series works better if you do it in the other order.
First convert the user, then remove the now-unused page_rmapping().

It's almost always a mistake to start with "I want to remove all the
users of API x".  You should be thinking "Here is function y that still
uses pages; I shall convert it to use folios".
Peng Zhang July 1, 2023, 2:57 a.m. UTC | #2
On 2023/7/1 5:39, Matthew Wilcox wrote:

> On Fri, Jun 30, 2023 at 08:13:08PM +0800, Peng Zhang wrote:
>> From: ZhangPeng <zhangpeng362@huawei.com>
>>
>> This minor patch series remove page_rmapping() and convert the last user
>> fault_dirty_shared_page() to use a folio.
> This patch series works better if you do it in the other order.
> First convert the user, then remove the now-unused page_rmapping().
>
> It's almost always a mistake to start with "I want to remove all the
> users of API x".  You should be thinking "Here is function y that still
> uses pages; I shall convert it to use folios".

Thanks for your feedback.

I'll reverse the order of the two patches. Convert user first, then remove the now-unused page_rmapping().

Best Regards,
Peng