[v2,0/7] mm: remove cgroup_throttle_swaprate() completely

Message ID 20230302115835.105364-1-wangkefeng.wang@huawei.com
Headers
Series mm: remove cgroup_throttle_swaprate() completely |

Message

Kefeng Wang March 2, 2023, 11:58 a.m. UTC
  Convert all the caller functions of cgroup_throttle_swaprate() to use
folios, and use folio_throttle_swaprate(),  which allows us to remove
cgroup_throttle_swaprate() completely.

v2:
- address comments from Matthew Wilcox, eg, 
  1) folio conversion inside  __do_huge_pmd_anonymous_page() function,
  2) rename __cgroup_throttle_swaprate() to __folio_throttle_swaprate()
  3) rename gfp_mask to gfp

Kefeng Wang (7):
  mm: huge_memory: convert __do_huge_pmd_anonymous_page() to use a folio
  mm: memory: use folio_throttle_swaprate() in do_swap_page()
  mm: memory: use folio_throttle_swaprate() in page_copy_prealloc()
  mm: memory: use folio_throttle_swaprate() in wp_page_copy()
  mm: memory: use folio_throttle_swaprate() in do_anonymous_page()
  mm: memory: use folio_throttle_swaprate() in do_cow_fault()
  mm: swap: remove unneeded cgroup_throttle_swaprate()

 include/linux/swap.h | 12 ++++--------
 mm/huge_memory.c     | 21 +++++++++++----------
 mm/memory.c          | 10 +++++-----
 mm/swapfile.c        |  6 +++---
 4 files changed, 23 insertions(+), 26 deletions(-)
  

Comments

Matthew Wilcox March 2, 2023, 7:04 p.m. UTC | #1
On Thu, Mar 02, 2023 at 07:58:28PM +0800, Kefeng Wang wrote:
> Convert all the caller functions of cgroup_throttle_swaprate() to use
> folios, and use folio_throttle_swaprate(),  which allows us to remove
> cgroup_throttle_swaprate() completely.

For the series:

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>