mbox series

[0/1] mm: swap: add nr argument in swapcache_prepare() and swapcache_clear()

Message ID 20240730071339.107447-1-21cnbao@gmail.com (mailing list archive)
Headers show
Series mm: swap: add nr argument in swapcache_prepare() and swapcache_clear() | expand

Message

Barry Song July 30, 2024, 7:13 a.m. UTC
From: Barry Song <v-songbaohua@oppo.com>


Per Baolin's request[1], shmem also depends on this patch. So I am separating
it from mTHP swap-in series[2] so that it can be pulled by Andrew earlier.

Differences with the version in the original series[2]
 * collect Baolin's reviewed-by tag, thanks!
 * add nr argument rather than instroduce new swapcache_prepare_nr() and
   swapcache_clear_nr() according to Willy's comment, thanks!

[1] https://lore.kernel.org/all/c2122229-3710-4e16-8932-303da0644a6a@linux.alibaba.com/
[2] https://lore.kernel.org/all/20240726094618.401593-1-21cnbao@gmail.com/

Barry Song (1):
  mm: swap: add nr argument in swapcache_prepare and swapcache_clear to
    support large folios

 include/linux/swap.h |   4 +-
 mm/memory.c          |   6 +--
 mm/swap.h            |   5 ++-
 mm/swap_state.c      |   2 +-
 mm/swapfile.c        | 101 +++++++++++++++++++++++++------------------
 5 files changed, 68 insertions(+), 50 deletions(-)