[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjc3vpQfSTzJ8DwCVfmj6Mhq16d375cMPOgFB5A1EL2tw@mail.gmail.com>
Date: Tue, 4 Jan 2022 13:39:49 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Yu Zhao <yuzhao@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <ak@...ux.intel.com>,
Catalin Marinas <catalin.marinas@....com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Hillf Danton <hdanton@...a.com>, Jens Axboe <axboe@...nel.dk>,
Jesse Barnes <jsbarnes@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Michael Larabel <Michael@...haellarabel.com>,
Michal Hocko <mhocko@...nel.org>,
Rik van Riel <riel@...riel.com>,
Vlastimil Babka <vbabka@...e.cz>,
Will Deacon <will@...nel.org>,
Ying Huang <ying.huang@...el.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, page-reclaim@...gle.com,
"the arch/x86 maintainers" <x86@...nel.org>,
Konstantin Kharlamov <Hi-Angel@...dex.ru>
Subject: Re: [PATCH v6 9/9] mm: multigenerational lru: Kconfig
On Tue, Jan 4, 2022 at 12:23 PM Yu Zhao <yuzhao@...gle.com> wrote:
>
> Add configuration options for the multigenerational lru.
> def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED
>
> +config NR_LRU_GENS
> + int "Max number of generations"
> + depends on LRU_GEN
> + range 4 31
> + default 4
> + help
> + This option uses order_base_2(N+1) bits in page flags.
> +
> + Do not configure more generations than you plan to use. They have a
> + per-memcg and per-node memory overhead.
> +
> +config TIERS_PER_GEN
> + int "Number of tiers per generation"
> + depends on LRU_GEN
> + range 2 5
> + default 4
> + help
> + This option uses N-2 bits in page flags.
> +
> + Larger values generally provide better protection for page cache when
> + under heavy buffered I/O workloads.
These are not appropriate questions to ask users.
No user has any idea what the answer should be. And no, we don't add
"benchmark tuning Kconfig questions" to the kernel. We leave those
kinds of games to companies that need to fake their benchmark numbers.
If *you* can't give a good number for these config options, then no
user or distro can either.
So just pick a number, and stand by it.
Don't do this kind of "I don't know what the right number is, so I'll
just push the blame on the user".
Linus
Powered by blists - more mailing lists