From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 086FFC433F5 for ; Wed, 12 Jan 2022 15:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jnIjbjcALkyQMBmlI/xaVRAs5U1bwGtOd1r83qF+9d8=; b=WwZXQsN1glXBCS w17RR7bqnK7z5MS55Qeaw8aBH0zxsujg5QE5DQlLmXTMpcMl2mfQHE6wTaxizBYck4vy5hlK1jHj5 Q7dNukXe5FkFLFnqLU2XKu0y3roVABn870RC9SOEwAdGhuDKuw0SB57dQT+MgEw1stGu8mwA3+LUp tYwn03F4YW7/A2qmJ7lp/vXimqaLcCAg+d+ua7exuA4GjHZQW6/ld6EGjWDvzsBtoK/DM9LMlpYx3 U7nKD4+g6hU/NENcCg1G2IXZI7sWARhEFciS3Yxf/XOyv7F8AEsTWf1fmvU7KiL/5yisez4FhSbIx Eq6Z6JMW8OVBlOtT245Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7foz-002ymf-P1; Wed, 12 Jan 2022 15:45:57 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7fow-002ym8-FR for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 15:45:56 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 80AE46193B; Wed, 12 Jan 2022 15:45:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC018C36AEB; Wed, 12 Jan 2022 15:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642002352; bh=qvNUE+XEvrVFgXHoMNSmjIwIHFkv7dTUFs/H0UfnT7g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gtQzJzJSziO7bzJCT8MJwa1ic1D49bD/T9hoh/GkUFvIH5EsAmwjkls73JMEfn8Y2 arb3u+tbfhy/+t4b/D0LdH0/j7MAcY80iguSoYMP+2V7LxZd53scEMHVEEJ5ez+6Md ldcwiJtsMKCs5kXV5jajxoM8RAOcDnww/iEnGpSt/FpuPniEaYcJJ2Ixh3JqacaCtK ikt0yS2T2tvjFpstNn9i+dcmHWKCEPVgGTv2oxWjHSKdk7Cmx/pp7dfH1aTS0jDd3i F9PSP/p3CDnmpLif7jtzGB5zG1MFtl4LUg0O5O8NcGrmJF1IgYer3TkukHbIaAmujy NV5MEIPsdMuPQ== Date: Wed, 12 Jan 2022 17:45:40 +0200 From: Mike Rapoport To: Yu Zhao Cc: Andrew Morton , Linus Torvalds , Andi Kleen , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, page-reclaim@google.com, x86@kernel.org, Konstantin Kharlamov Subject: Re: [PATCH v6 8/9] mm: multigenerational lru: user interface Message-ID: References: <20220104202227.2903605-1-yuzhao@google.com> <20220104202227.2903605-9-yuzhao@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_074554_641892_E8595039 X-CRM114-Status: GOOD ( 32.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 12, 2022 at 01:35:52AM -0700, Yu Zhao wrote: > On Mon, Jan 10, 2022 at 12:27:19PM +0200, Mike Rapoport wrote: > > Hi, > > > > On Tue, Jan 04, 2022 at 01:22:27PM -0700, Yu Zhao wrote: > > > Add /sys/kernel/mm/lru_gen/enabled as a runtime kill switch. > > > > > > Add /sys/kernel/mm/lru_gen/min_ttl_ms for thrashing prevention. > > > Compared with the size-based approach, e.g., [1], this time-based > > > approach has the following advantages: > > > 1) It's easier to configure because it's agnostic to applications and > > > memory sizes. > > > 2) It's more reliable because it's directly wired to the OOM killer. > > > > > > Add /sys/kernel/debug/lru_gen for working set estimation and proactive > > > reclaim. Compared with the page table-based approach and the PFN-based > > > approach, e.g., mm/damon/[vp]addr.c, this lruvec-based approach has > > > the following advantages: > > > 1) It offers better choices because it's aware of memcgs, NUMA nodes, > > > shared mappings and unmapped page cache. > > > 2) It's more scalable because it's O(nr_hot_evictable_pages), whereas > > > the PFN-based approach is O(nr_total_pages). > > > > > > Add /sys/kernel/debug/lru_gen_full for debugging. > > > > > > [1] https://lore.kernel.org/lkml/20211130201652.2218636d@mail.inbox.lv/ > > > > > > Signed-off-by: Yu Zhao > > > Tested-by: Konstantin Kharlamov > > > --- > > > Documentation/vm/index.rst | 1 + > > > Documentation/vm/multigen_lru.rst | 62 +++++ > > > > The description of user visible interfaces should go to > > Documentation/admin-guide/mm > > > > Documentation/vm/multigen_lru.rst should have contained design description > > and the implementation details and it would be great to actually have such > > document. > > Will do, thanks. > > > > include/linux/nodemask.h | 1 + > > > mm/vmscan.c | 415 ++++++++++++++++++++++++++++++ > > > 4 files changed, 479 insertions(+) > > > create mode 100644 Documentation/vm/multigen_lru.rst > > > > > > diff --git a/Documentation/vm/index.rst b/Documentation/vm/index.rst > > > index 6f5ffef4b716..f25e755b4ff4 100644 > > > --- a/Documentation/vm/index.rst > > > +++ b/Documentation/vm/index.rst > > > @@ -38,3 +38,4 @@ algorithms. If you are looking for advice on simply allocating memory, see the > > > unevictable-lru > > > z3fold > > > zsmalloc > > > + multigen_lru > > > diff --git a/Documentation/vm/multigen_lru.rst b/Documentation/vm/multigen_lru.rst > > > new file mode 100644 > > > index 000000000000..6f9e0181348b > > > --- /dev/null > > > +++ b/Documentation/vm/multigen_lru.rst > > > @@ -0,0 +1,62 @@ > > > +.. SPDX-License-Identifier: GPL-2.0 > > > + > > > +===================== > > > +Multigenerational LRU > > > +===================== > > > + > > > +Quick start > > > +=========== > > > +Runtime configurations > > > +---------------------- > > > +:Required: Write ``1`` to ``/sys/kernel/mm/lru_gen/enable`` if the > > > + feature wasn't enabled by default. > > > > Required for what? This sentence seem to lack context. Maybe add an > > overview what is Multigenerational LRU so that users will have an idea what > > these knobs control. > > Apparently I left an important part of this quick start in the next > patch, where Kconfig options are added. I'm wonder whether I should > squash the next patch into this one. I think documentation deserves a separate patch. -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel