From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.229 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796280219; b=Y/4v05HNeYLzVKkq/pzZgknH5LQKmuorXVx37uL295UjbdVzmjQjzAMEhhjDFWiFKA3q eh4RvHsXl9xOW9uBw4Dqda2U1bnw/7nHHLM7pp3cH3KkhIQsIm+asxuZs/swoeY7FgIQ9 zC7oQ3ED3LVfFM9vOAVpzluIucn8+oSiWe/wy9XsVGd9pOhWaWmpXBvLW7J3dRmm5QWaj Nijw+0CbPwGTOCZrtnq0sqpHbFS59O+5uJ6IUlXByn0UdClMVUpUSsJR/4I8NaG9GzsPX 5ffUlUpEVI9B0bYkanFiYVzF5+C/LyNLATSzWJqNH7PXYzT4qtuCLOEAofjRWc8Jp4g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796280219; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=FJ3NvNeZFhxBK5Q/Wt6+x9HSK/nuMnK4ocMWN8amH/E=; b=DtVShD6uYLdA5HQ/h6T7Bu/P+kVfT3+iz/iji7LWMNEb8ZToZ0MwWBO0kiiDV595j7Dh 8Uv9CIS1imTi6PuShyPNYmDgjdTo+AcMwp0W7xWxJo5lKAbIi5+NHcXxU1Tzl91oedlub eoKJUCu47UfTP70YpLepyyCZQMEwEJ7GCHcvD1SGig1ayIplXQrYbByt1AL5TdN2aEmAv en7nUyO9VDxXW2ImkadA/v5at5ovf+Vlw0AP61I5EjnypaXoEkXBQ75ERKlKS7UibgJiA O7uoUCbCOCpVVxKgmqcD6cEwDXlJMLZE3IyTqACQeb1DXSqmFOh4bSUIwDhYATgROcw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fxDIK+MO; arc=none smtp.remote-ip=91.218.175.229 Received: from mta0.migadu.com (out-229.mta0.migadu.com [91.218.175.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD403606A322 for ; Thu, 3 Dec 2026 06:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AD403606A322 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, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fxDIK+MO X-Envelope-To: linux-doc@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=qtw2voJWhgxwGpCWmQKzhv9jGxNk8Px1gt+Lnlgw6LE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796280216; v=1; x=1796885016; b=fxDIK+MOLH3DyyRJBEDAZpQXJJr6AzaairnCJV1zkv5PoOPGMWTTMqbKMySUPEgUZGSyiufa VbHRKqQ3kL4tyT+PgJoFo+crvDf12HwJc0Gglf7+kdg8ZIuVLlx9Ewgbt0O61N6OW+roe9ZW4xF U10uI8JRH3kEM9Dr1TE2Kh6M= X-Envelope-To: linux-doc@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id b452fe735176fd4d; Thu, 03 Dec 2026 06:43:36 +0000 X-Mizu-Trace-ID: b452fe735176fd4d X-Migadu-Flow: FLOW_OUT Message-ID: Date: Thu, 3 Dec 2026 14:43:12 +0800 X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] mm/mglru: fix the outdated can_swap field of the aging command To: Chuanhua Han , Andrew Morton , David Hildenbrand , Jonathan Corbet , Kairui Song Cc: Axel Rasmussen , Baolin Wang , Baoquan He , Barry Song , "Liam R. Howlett" , linux-doc@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Mike Rapoport , Randy Dunlap , Shakeel Butt , Shuah Khan , Vlastimil Babka , Wei Xu , Yuanchu Xie , Chuanhua Han References: <20261203040003.16978-1-hanchuanhua802@gmail.com> From: Qi Zheng In-Reply-To: <20261203040003.16978-1-hanchuanhua802@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Chuanhua, On 12/3/26 12:00 PM, Chuanhua Han wrote: > From: Chuanhua Han > > 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. > > Signed-off-by: Chuanhua Han > --- > v1 -> v2: > - Reword the subject to make it clear this is a doc fix (Barry) > - Say "VMAs" instead of "pages" and mention shmem VMAs (Barry) > - Fix the From/Signed-off-by mismatch (Barry) > - Drop the test notes (Barry) > v1: https://lore.kernel.org/linux-mm/20261202121419.4026587-1-hanchuanhua@xiaomi.com/ > > Documentation/admin-guide/mm/multigen_lru.rst | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/Documentation/admin-guide/mm/multigen_lru.rst b/Documentation/admin-guide/mm/multigen_lru.rst > index 9cb54b4ff5d9..7c2c6af61fe0 100644 > --- a/Documentation/admin-guide/mm/multigen_lru.rst > +++ b/Documentation/admin-guide/mm/multigen_lru.rst > @@ -122,10 +122,13 @@ the former is the largest and that of the latter is the smallest. > 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`` Or could this also be `memcg->swappiness` under cgroup v1? > +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. It reads a bit odd at first glance. Maybe add a note on why we still need to scan here — e.g. to update the stats? Demotion could also be a case? Thanks, Qi > ``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.