The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Jianyue Wu <wujianyue000@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	 Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	 Barry Song <baohua@kernel.org>,
	Youngjun Park <youngjun.park@lge.com>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	David Hildenbrand <david@kernel.org>,
	 Michal Hocko <mhocko@kernel.org>, Qi Zheng <qi.zheng@linux.dev>,
	 Shakeel Butt <shakeel.butt@linux.dev>,
	Axel Rasmussen <axelrasmussen@google.com>,
	 Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	 Michal Hocko <mhocko@suse.com>, Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	Hugh Dickins <hughd@google.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-doc@vger.kernel.org, Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v9 2/3] mm: rename swap.c to folio.c
Date: Tue, 4 Aug 2026 10:46:08 +0100	[thread overview]
Message-ID: <anG0QwQddFNo8PKJ@lucifer> (raw)
In-Reply-To: <20260708-ch-swap-series-plus-folio-lru-cleanup-v9-2-2bc72b4f8730@gmail.com>

On Wed, Jul 08, 2026 at 07:35:44PM +0800, Jianyue Wu wrote:
> Rename mm/swap.c to mm/folio.c so the filename better matches
> the code's main responsibility.
>
> This keeps the implementation split from swap-specific code without
> changing the published LRU helper interfaces.
>
> Update MAINTAINERS and the remaining mm/swap.c documentation references
> after the rename.
>
> Suggested-by: Baoquan He <bhe@redhat.com>
> Suggested-by: David Hildenbrand <david@kernel.org>
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Jianyue Wu <wujianyue000@gmail.com>
> ---
>  Documentation/admin-guide/sysctl/vm.rst |  3 ---
>  Documentation/core-api/mm-api.rst       |  2 +-
>  MAINTAINERS                             |  3 +--
>  mm/Makefile                             |  2 +-
>  mm/{swap.c => folio.c}                  | 10 +++-------
>  5 files changed, 6 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst
> index 22cc54cac3b2..5b318d17aa4b 100644
> --- a/Documentation/admin-guide/sysctl/vm.rst
> +++ b/Documentation/admin-guide/sysctl/vm.rst
> @@ -19,9 +19,6 @@ The files in this directory can be used to tune the operation
>  of the virtual memory (VM) subsystem of the Linux kernel and
>  the writeout of dirty data to disk.
>
> -Default values and initialization routines for most of these
> -files can be found in mm/swap.c.
> -
>  Currently, these files are in /proc/sys/vm:
>
>  - admin_reserve_kbytes
> diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst
> index 4df7d5edbee5..c1d03a5a2a19 100644
> --- a/Documentation/core-api/mm-api.rst
> +++ b/Documentation/core-api/mm-api.rst
> @@ -118,7 +118,7 @@ More Memory Management Functions
>  .. #kernel-doc:: mm/hmm.c (build warnings)
>  .. kernel-doc:: mm/memremap.c
>  .. kernel-doc:: mm/hugetlb.c
> -.. kernel-doc:: mm/swap.c
> +.. kernel-doc:: mm/folio.c
>  .. kernel-doc:: mm/memcontrol.c
>  .. #kernel-doc:: mm/memory-tiers.c (build warnings)
>  .. kernel-doc:: mm/shmem.c
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d19822d574fd..c3e535ca4bef 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17085,7 +17085,7 @@ F:	Documentation/admin-guide/mm/multigen_lru.rst
>  F:	Documentation/mm/multigen_lru.rst
>  F:	include/linux/mm_inline.h
>  F:	include/linux/mmzone.h
> -F:	mm/swap.c
> +F:	mm/folio.c

Hmm noticed today that mm/folio.c is in the MGLRU section :)

This doesn't seem correct - shouldn't this be moved to the core mm section?

If this is already in mm-stable can send a follow up patch for that?

>  F:	mm/vmscan.c
>  F:	mm/workingset.c
>
> @@ -17237,7 +17237,6 @@ F:	include/linux/swap.h
>  F:	include/linux/swapfile.h
>  F:	include/linux/swapops.h
>  F:	mm/page_io.c
> -F:	mm/swap.c
>  F:	mm/swap.h
>  F:	mm/swap_table.h
>  F:	mm/swap_state.c
> diff --git a/mm/Makefile b/mm/Makefile
> index 4fc713867b9b..8e7e964b99a4 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -50,7 +50,7 @@ endif
>
>  obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
>  			   maccess.o page-writeback.o folio-compat.o \
> -			   readahead.o swap.o truncate.o vmscan.o shrinker.o \
> +			   readahead.o folio.o truncate.o vmscan.o shrinker.o \
>  			   shmem.o util.o mmzone.o vmstat.o backing-dev.o \
>  			   mm_init.o percpu.o slab_common.o \
>  			   compaction.o show_mem.o \
> diff --git a/mm/swap.c b/mm/folio.c
> similarity index 99%
> rename from mm/swap.c
> rename to mm/folio.c
> index c88643e56af7..d2937600cf72 100644
> --- a/mm/swap.c
> +++ b/mm/folio.c
> @@ -1,17 +1,13 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  /*
> - *  linux/mm/swap.c
> + *  linux/mm/folio.c
>   *
>   *  Copyright (C) 1991, 1992, 1993, 1994  Linus Torvalds
>   */
>
>  /*
> - * This file contains the default values for the operation of the
> - * Linux VM subsystem. Fine-tuning documentation can be found in
> - * Documentation/admin-guide/sysctl/vm.rst.
> - * Started 18.12.91
> - * Swap aging added 23.2.95, Stephen Tweedie.
> - * Buffermem limits added 12.3.98, Rik van Riel.
> + * Folio LRU helpers: add/remove folios from LRU lists, batching,
> + * activation/deactivation, and page cache release paths.
>   */
>
>  #include <linux/mm.h>
>
> --
> 2.43.0
>

--
Cheers, Lorenzo

  reply	other threads:[~2026-08-04  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 11:35 [PATCH v9 0/3] mm: clean up folio LRU and swap declarations Jianyue Wu
2026-07-08 11:35 ` [PATCH v9 1/3] mm/swap: colocate page-cluster sysctl with swap readahead Jianyue Wu
2026-07-08 11:35 ` [PATCH v9 2/3] mm: rename swap.c to folio.c Jianyue Wu
2026-08-04  9:46   ` Lorenzo Stoakes (ARM) [this message]
2026-08-04 10:16     ` Jianyue Wu
2026-08-04 11:11     ` [PATCH] MAINTAINERS: move mm/folio.c to MM CORE Jianyue Wu
2026-07-08 11:35 ` [PATCH v9 3/3] mm: move reclaim-internal declarations out of swap.h Jianyue Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anG0QwQddFNo8PKJ@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=baoquan.he@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kasong@tencent.com \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nphamcs@gmail.com \
    --cc=qi.zheng@linux.dev \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=wujianyue000@gmail.com \
    --cc=youngjun.park@lge.com \
    --cc=yuanchu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox