[PATCH v2 0/3] mm/swap: use swap_ops to register swap device's methods

Barry Song posted 3 patches 5 days, 4 hours ago
MAINTAINERS                 |   2 +-
include/linux/swap.h        |   2 +
mm/Makefile                 |   2 +-
mm/swap.h                   |  12 ++++-
mm/{page_io.c => swap_io.c} | 101 ++++++++++++++++++++----------------
mm/swapfile.c               |   1 +
mm/zswap.c                  |   3 +-
7 files changed, 73 insertions(+), 50 deletions(-)
rename mm/{page_io.c => swap_io.c} (89%)
[PATCH v2 0/3] mm/swap: use swap_ops to register swap device's methods
Posted by Barry Song 5 days, 4 hours ago
From: Barry Song <baohua@kernel.org>

-v2:
 * lots of cleanup for patch 2/3: renaming, moving data
   structures, and using const properly
 * collected tags from Kairui, Nhat and Barry

-v1:
 https://lore.kernel.org/linux-mm/20260302104016.163542-1-bhe@redhat.com/

This can simplify the code logic and benefit any new type of swap device
added later.

And also do renaming in this patchset:
-------
   file renaming:
   ---
   mm/page_io.c to mm/swap_io.c

   function renaming:
   ---
   swap_writepage_* to swap_write_folio_* in file mm/swap_io.c

Baoquan He (3):
  mm/swap: rename mm/page_io.c to mm/swap_io.c
  mm/swap: use swap_ops to register swap device's methods
  mm/swap_io.c: rename swap_writepage_* to swap_write_folio_*

 MAINTAINERS                 |   2 +-
 include/linux/swap.h        |   2 +
 mm/Makefile                 |   2 +-
 mm/swap.h                   |  12 ++++-
 mm/{page_io.c => swap_io.c} | 101 ++++++++++++++++++++----------------
 mm/swapfile.c               |   1 +
 mm/zswap.c                  |   3 +-
 7 files changed, 73 insertions(+), 50 deletions(-)
 rename mm/{page_io.c => swap_io.c} (89%)

-- 
2.39.3 (Apple Git-146)
Re: [PATCH v2 0/3] mm/swap: use swap_ops to register swap device's methods
Posted by Baoquan He 3 days, 11 hours ago
On 03/28/26 at 03:58pm, Barry Song wrote:
> From: Barry Song <baohua@kernel.org>
> 
> -v2:
>  * lots of cleanup for patch 2/3: renaming, moving data
>    structures, and using const properly
>  * collected tags from Kairui, Nhat and Barry

Thanks a lot for taking care of this, Barry. I took several days off for
family reason. Sorry for the inconvenience caused by my leave.

> 
> -v1:
>  https://lore.kernel.org/linux-mm/20260302104016.163542-1-bhe@redhat.com/
> 
> This can simplify the code logic and benefit any new type of swap device
> added later.
> 
> And also do renaming in this patchset:
> -------
>    file renaming:
>    ---
>    mm/page_io.c to mm/swap_io.c
> 
>    function renaming:
>    ---
>    swap_writepage_* to swap_write_folio_* in file mm/swap_io.c
> 
> Baoquan He (3):
>   mm/swap: rename mm/page_io.c to mm/swap_io.c
>   mm/swap: use swap_ops to register swap device's methods
>   mm/swap_io.c: rename swap_writepage_* to swap_write_folio_*
> 
>  MAINTAINERS                 |   2 +-
>  include/linux/swap.h        |   2 +
>  mm/Makefile                 |   2 +-
>  mm/swap.h                   |  12 ++++-
>  mm/{page_io.c => swap_io.c} | 101 ++++++++++++++++++++----------------
>  mm/swapfile.c               |   1 +
>  mm/zswap.c                  |   3 +-
>  7 files changed, 73 insertions(+), 50 deletions(-)
>  rename mm/{page_io.c => swap_io.c} (89%)
> 
> -- 
> 2.39.3 (Apple Git-146)
>