From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796275759; b=m9UKOXMc1QskamSqf8ncyNVmdY6ghHM0njE/PJuz4PhNR6uH7mKxu4lis/ncgVhF1EEv YiwF9183Ao0+ykVQNUHDijoH8FexCsK2XABSr8Elz2QMRW4wFFZppNxnur8W7AMJgEazb tcu4PALPHaIEX2a2N9N6LiHsn1Iu1cwwRHhC7JofyhphbO37sFBIezEtyvVzrPpwrJxDi sQjfjBqSMOk37m06dPNvV4TdUBMxERRmmxloVtg/fKhAfNSG+PjQJEiDa8LrSGxBdSQhC Or4OvKY3uKJU46ENs9zVlkwn5eUc/xmAEl2cYu2lIQ9FUlzxoXd6paMgGWFeGn3jl/w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796275759; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=Bkv7inubU78fkqjCmkUfpiewuSti8PUdZahREzFPEVg=; b=sXuQj1iV/m6nBT4108HF5iZTbCA3Smpswzz8TPrNA9FxZHlPMSX3Pct8OcInDJzgjgMb cyMRIWTDVd15Pexr78nxDF2wyZVn584iSir+iuTKvcZZU5ndJgfYlp7dvoS+zJP+pqk9s yuUNK+Z12cPN3viwuLeu7ZV2mWcWo3zCuX8mikp3jPYAkySU2UsvQfHwUWZjyTJG1xjRe Zez16GhjeA/iZAP2F7AfVoDgnIVN4GlPTs1OIb8Q7rDKd8VQTWpSDITTeEqmAzDgKZFfy mxUzkvSw3w6LRDuPD0RG3vD8a5tWfHP6RcWidJMeXoqsXUQi6VjxSBWVCj5LKNDNIZw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=ldOPdAok; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1DAC606A322 for ; Thu, 3 Dec 2026 05:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=ldOPdAok Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57F501F00893; Thu, 3 Dec 2026 05:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796275758; bh=Bkv7inubU78fkqjCmkUfpiewuSti8PUdZahREzFPEVg=; h=Date:To:From:In-Reply-To:References:Subject; b=ldOPdAokTUYd5BuptfaHM+/3ip2SdCh90DdUtPuQq/6qx8JFu4ECWR8v/cHwfdDYY TgJEOrKkdFUmIUpls4fOggfd1tHvgNEVZrabnuxFQl1694G6E3y/26mEhfGxGkKinr d9GNfG8RzltOape3OlDWnKgvS1c09tTFttNVCFjM= Date: Wed, 02 Dec 2026 21:29:17 -0800 To: mm-commits@vger.kernel.org,yuanchu@google.com,weixugc@google.com, vbabka@kernel.org,skhan@linuxfoundation.org,shakeel.butt@linux.dev, rppt@kernel.org,rdunlap@infradead.org,qi.zheng@linux.dev,mhocko@suse.com, liam@infradead.org,kasong@tencent.com,david@kernel.org,corbet@lwn.net, baoquan.he@linux.dev,baolin.wang@linux.alibaba.com,baohua@kernel.org, axelrasmussen@google.com,hanchuanhua@xiaomi.com,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261203040003.16978-1-hanchuanhua802@gmail.com> References: <20261203040003.16978-1-hanchuanhua802@gmail.com> Subject: + mm-mglru-fix-the-outdated-can_swap-field-of-the-aging-command.patch added to mm-new branch Message-Id: <20261203052918.57F501F00893@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: mm/mglru: fix the outdated can_swap field of the aging command has been added to the -mm mm-new branch. Its filename is mm-mglru-fix-the-outdated-can_swap-field-of-the-aging-command.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mglru-fix-the-outdated-can_swap-field-of-the-aging-command.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Chuanhua Han Subject: mm/mglru: fix the outdated can_swap field of the aging command Date: Thu, 03 Dec 2026 12:00:03 +0800 The fourth field of the aging command in /sys/kernel/debug/lru_gen is documented as can_swap, but lru_gen_seq_write() parses it as a swappiness value, the same as for the eviction command. Commit b40599930f00 ("mm: add max swappiness arg to lru_gen for anonymous memory only") added "max" to this field, but documented it only for eviction. For aging, the value decides which VMAs the page table walk scans: 0 skips anon and shmem VMAs, "max" skips file VMAs other than shmem, and any value in [1, 200] scans both. Document the field as swappiness. Link: https://patch.msgid.link/20261203040003.16978-1-hanchuanhua802@gmail.com Signed-off-by: Chuanhua Han Signed-off-by: Andrew Morton Reviewed-by: Barry Song Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Kairui Song Cc: Axel Rasmussen Cc: Baolin Wang Cc: Baoquan He Cc: Liam R. Howlett Cc: Michal Hocko Cc: Mike Rapoport Cc: Qi Zheng Cc: Randy Dunlap Cc: Shakeel Butt Cc: Shuah Khan Cc: Vlastimil Babka Cc: Wei Xu Cc: Yuanchu Xie Documentation/admin-guide/mm/multigen_lru.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/Documentation/admin-guide/mm/multigen_lru.rst~mm-mglru-fix-the-outdated-can_swap-field-of-the-aging-command +++ a/Documentation/admin-guide/mm/multigen_lru.rst @@ -122,10 +122,13 @@ the former is the largest and that of th Users can write the following command to ``lru_gen`` to create a new generation ``max_gen_nr+1``: - ``+ memcg_id node_id max_gen_nr [can_swap [force_scan]]`` + ``+ memcg_id node_id max_gen_nr [swappiness [force_scan]]`` -``can_swap`` defaults to the swap setting and, if it is set to ``1``, -it forces the scan of anon pages when swap is off, and vice versa. +``swappiness`` overrides the default value in ``/proc/sys/vm/swappiness`` +and the valid range is [0-200, max]. If it is set to ``0``, the page +table walk skips anon and shmem VMAs; if it is set to ``max``, it skips +file VMAs other than shmem; otherwise, it scans both. For any nonzero +value, anon and shmem VMAs are scanned even when swap is off. ``force_scan`` defaults to ``1`` and, if it is set to ``0``, it employs heuristics to reduce the overhead, which is likely to reduce the coverage as well. _ Patches currently in -mm which might be from hanchuanhua@xiaomi.com are mm-mglru-remove-the-unused-scan_control-argument-of-isolate_folio.patch mm-mglru-fix-the-outdated-can_swap-field-of-the-aging-command.patch