From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 424AB34C9A6 for ; Tue, 2 Jun 2026 11:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780399710; cv=none; b=r6B2RlX39YWXD2u+9BRupb+m+Kygtw6rV/SsaAqrtK4WC1+XF0uNXpSnfxFQIrqukjs7pGETOwtzBm63VSq61DkYWqfvjjDc5Mpl9DCufTMUCItQZKVZw66oQxCvH3MwoQfXAlTYCmv5GYQNcbKY/7P83rjf4eE/bwQyBU/U+g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780399710; c=relaxed/simple; bh=OjAywOhK+PlJuhc6dWKq0mp+FnRcIwTFyvIxHtzH+6k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J0jG4AW6T4Aunm7XyYO/9rPOY/LrSVW6mvdJ5mAdR2L6SmFixQ9lurQTo5mbxWPfAP3mr8sR3XHZZ0l4uFvyRcCwPZAO4IQgQNRJBWhGwmCqB1Nvev1efo4I1tD6gxpPS7DpoHGfqMLF2Ur2Z+t9uUfSVc5DoUcsWy5cxi8DGqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wuI3G9V5; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wuI3G9V5" Date: Tue, 2 Jun 2026 19:28:05 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780399705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DqIp9oLiwLP2+3Nhy9P7Nc7jHSP98WdXRQhmtOU/X1k=; b=wuI3G9V5joRwS25/kCM1W+4B5A8YDJp2Oy3gpzXuENkTevI3r+vC4pB87PewrKOt4rAQvW trO6T8+owDWKQ/Lx11TV5eYnc5Z9/B0uYts/A2jMhIM6GUA2nS8aanJKdar+Hz8VYhpJXS M7HTv/xyXnx+/HmpXdoFxUUgMQTjT7o= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Baoquan He To: Jianyue Wu Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , Qi Zheng , Shakeel Butt , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Hugh Dickins , Baolin Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] mm: move folio LRU code out of swap Message-ID: References: <20260602-ch-swap-series-plus-folio-lru-cleanup-v3-0-5bbb567f8c99@gmail.com> <20260602-ch-swap-series-plus-folio-lru-cleanup-v3-2-5bbb567f8c99@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260602-ch-swap-series-plus-folio-lru-cleanup-v3-2-5bbb567f8c99@gmail.com> X-Migadu-Flow: FLOW_OUT On 06/02/26 at 09:01am, Jianyue Wu wrote: > Rename mm/swap.c to mm/folio_lru.c so the filename better matches > the code's main responsibility. Isn't the main action of this patch renaming mm/swap.c to mm/folio_lru.c? Why the subject still saying moving folio LRU code out of swap? I am a little confused? > > 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 > Suggested-by: David Hildenbrand > Signed-off-by: Jianyue Wu > --- > Documentation/admin-guide/sysctl/vm.rst | 2 +- > Documentation/core-api/mm-api.rst | 2 +- > MAINTAINERS | 3 +-- > mm/Makefile | 2 +- > mm/{swap.c => folio_lru.c} | 2 +- > 5 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst > index 97e12359775c..31d135e107cb 100644 > --- a/Documentation/admin-guide/sysctl/vm.rst > +++ b/Documentation/admin-guide/sysctl/vm.rst > @@ -20,7 +20,7 @@ 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. > +files can be found in mm/swap_state.c. Sorry, I don't get what are 'these files' for most of which default values and initialization routines can be found in mm/swap.c or mm/swap_state.c. I tried to search some of them, they are not in mm/swap*. Could you double check if this sentence is still meaningful. > > Currently, these files are in /proc/sys/vm: > > diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst > index aabdd3cba58e..d6d189b9a996 100644 > --- a/Documentation/core-api/mm-api.rst > +++ b/Documentation/core-api/mm-api.rst > @@ -117,7 +117,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_lru.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 e3ee97f5474e..6bd39e0afceb 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -16900,7 +16900,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_lru.c > F: mm/vmscan.c > F: mm/workingset.c > > @@ -17045,7 +17045,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 eff9f9e7e061..5f712f9bbe73 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_lru.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_lru.c > similarity index 99% > rename from mm/swap.c > rename to mm/folio_lru.c > index e4b3dadaa6dc..7dab6a544d94 100644 > --- a/mm/swap.c > +++ b/mm/folio_lru.c > @@ -1,6 +1,6 @@ > // SPDX-License-Identifier: GPL-2.0-only > /* > - * linux/mm/swap.c > + * linux/mm/folio_lru.c > * > * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds > */ > > -- > 2.43.0 >