From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.54.127.68 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795087482; b=0NasWJVQoF9IFZbSX4FoLKrEYh0P5++XoI9YetkmTbgKLU3nZLMYXvuc7S4N+1zKvURR Q88oks3vUMq8yQ0ROvqo/wZKkpKukX9a+XfEmGcyFVIyoG7F9+yy5rUJCyblkzK/m1fL4 pqJQCdedsLWS8FWkHMG7kUuIfN5/FEmW1PtAkOBOpd6idSHTMfx03CYJqKPRLz3zasbw0 4VeWZY/xo1ywHAgHwz9rdmxPM8mDlPwaXxnzVU9UNPT5ZvUAUuoubPJWkk7Ytnca2vUOd r0Bw13/bmgaUxXc8fQmUSQDkxyzCtIML2DI6K8r/ioViJp2WO5s7PhLypt1rg+++A6w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795087482; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Envelope-From; bh=9Y4HSKGmKLqBmv82uN8Zw1yJpfCCeKgGfjpKz1LLlzs=; b=ibKjAoNVl1MHnQk3sWlLmSvI477y6sgctILlOdn8jOXbqYHDiNDEcdCZsawKhqZDe1Jx TJINrvTLQ/AKPrLJdYspK3HN+M4Q9mxTQtRKHxl3Q2D1qglOZ6/eL2Aeg9POSP7G79cfd yti7RKun+8SsQOnmWlDTG84wvI/rVxlUK7ymEJ6Z6EsrxmgAOq70hsapmlgz5dkAB5J+J mvtl1YjExbotSVHRZnCLi2vOaUzWU5CSMic6eFHu9mb8NjglKutyJDP30OKe0/zyPJ7fd 9dQ0a5J4pU27q9qDFjDZNK2uCt5zDp1buLPyIGfMISfsB4JoOoYBCFtJLRCk84zFFwQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=tychen.cc; spf=pass smtp.mailfrom=tychen.cc; dkim=pass header.d=tychen.cc header.i=@tychen.cc header.a=rsa-sha256 header.s=spacemail header.b=QFssQDBU; arc=none smtp.remote-ip=198.54.127.68 Received: from out-zbxj-a68.jellyfish.systems (out-zbxj-a68.jellyfish.systems [198.54.127.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6C1606A326 for ; Thu, 19 Nov 2026 11:24:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EE6C1606A326 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=tychen.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tychen.cc Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tychen.cc header.i=@tychen.cc header.a=rsa-sha256 header.s=spacemail header.b=QFssQDBU Received: from fedora (ec2-52-197-241-54.ap-northeast-1.compute.amazonaws.com [52.197.241.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.spacemail.com (Postfix) with ESMTPSA id 4jVbhS4WPLz8sWT; Thu, 19 Nov 2026 11:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tychen.cc; s=spacemail; t=1795087465; bh=9Y4HSKGmKLqBmv82uN8Zw1yJpfCCeKgGfjpKz1LLlzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QFssQDBU1bWgh5y1TGsTPlJBzh222++oczH4cleFn81Ik9KK1tcsybvy2u8PoG98e 9E0oFppVnJX46zo5smPRv7Y69CZiOxAsRIXtIqO+/mvKfUZJqP0HCPXqh2FYWHpkyP j+7rU7BUV3pZQ+I+zOmYB05/vr5sEUJcKPu8NP0kDSEcazUaz6fCkNU92yM9o7mbYE DJaYV3Kj5jLcKP4kHLAe7ycckEVMZuF0tIYhOIT0BV7idayvyclagc6LFG8IIp6vrv mkzLXPapiNWtPHXOMz7nMy3835yv0C0JPXl1npzATBg3tix7i63IkvltjWJXkERgGv wWfrRY4Li7D9Q== From: Tianyi Chen To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Muchun Song , Qi Zheng , Ying Huang , Chris Li , Baoquan He , Nico Pache , Usama Arif , Michal Hocko , Roman Gushchin , Shakeel Butt , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Vlastimil Babka , Suren Baghdasaryan , Nhat Pham , Youngjun Park , Zi Yan , Gregory Price , "Matthew Wilcox (Oracle)" , Baolin Wang , Ryan Roberts , Dev Jain , Lance Yang , Hugh Dickins , SJ Park , David Rientjes , Yu Zhao , Vernon Yang , Zicheng Wang , Chen Ridong , Tal Zussman , Kairui Song , Xiang Liu , Ehab Ababneh , Zhao Zhenzhuo , Lian Wang , Joanne Koong , Kunwu Chan , Hui Zhu , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, damon@lists.linux.dev, linux-doc@vger.kernel.org, Maxim Muzafarov , hi@tychen.cc Subject: Re: [PATCH v5 00/17] mm/mglru: frequency guided promotion (MGLRU-FG) Date: Thu, 19 Nov 2026 20:23:56 +0900 Message-ID: <20261119112357.275352-1-hi@tychen.cc> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261119-mglru-fg-v5-0-9eee2fe97a2d@tencent.com> References: <20261119-mglru-fg-v5-0-9eee2fe97a2d@tencent.com> 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 Content-Transfer-Encoding: 7bit X-Envelope-From: hi@tychen.cc On Thu, Nov 19, 2026 at 05:03:32AM +0800, Kairui Song wrote: > That's because MGLRU deliberately disables hotness tracking for > MADV_RANDOM areas while CLRU still has refault distance. [...] I ran the OpenSearch k-NN test from the RFC thread [1] on this series. Its .vec/.vex index files are mapped with MADV_RANDOM, so from the paragraph above I expected no change. With FG the gap is gone in this test. Setup: 25fee5b1762b with and without all 17 patches (they applied cleanly), the same .config, and a fresh 4 vCPU / 5 GiB KVM guest per kernel. OpenSearch and a one-pass 96 MiB mmap scan share a 1 GiB memcg with no swap. 5 seeds, lru_gen enabled=7 vs 0. The script is unchanged from [1]. Medians over the 5 seeds, last 1,000 queries after the scan: p99 (ms) memcg file refaults .vec resident (MiB) base, MGLRU 66.18 144,387 99.98 base, lru_gen=0 2.09 0 117.19 FG, MGLRU 2.16 0 117.19 FG, lru_gen=0 2.12 0 117.19 Right after the scan, base MGLRU had already dropped .vec from 117.2 MiB to 54-71 MiB (median 66.3) in all 5 runs. FG kept the full 117.2 MiB in all 5. All 5 seeds go the same way, and classic LRU is the same on both kernels. This is one synthetic setup and I tested the series as a whole, so I can't say which patch makes the difference. [1] https://lore.kernel.org/linux-mm/20261119082441.196139-1-hi@tychen.cc/ Thanks, Tianyi Assisted-by: LLM