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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8980EC433F5 for ; Tue, 4 Jan 2022 21:40:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D5AD06B0072; Tue, 4 Jan 2022 16:40:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D09FF6B0073; Tue, 4 Jan 2022 16:40:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BAAC66B0074; Tue, 4 Jan 2022 16:40:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id AA2616B0072 for ; Tue, 4 Jan 2022 16:40:19 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5FC468249980 for ; Tue, 4 Jan 2022 21:40:19 +0000 (UTC) X-FDA: 78993923358.22.65BFEB2 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf11.hostedemail.com (Postfix) with ESMTP id A040040007 for ; Tue, 4 Jan 2022 21:40:14 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id bm14so153728914edb.5 for ; Tue, 04 Jan 2022 13:40:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BJ+v55yUFiLI/4g7mFYq1QZLgbrpUXzZ9wJ+9sDmYqY=; b=dshp9e3zGhy1oAbNcYfkNWToEIOghrWZ0wBynLm22Q25H7Twu0+1Vn2n4vbi7LXHG7 yzTSzC+9R9UVB6CXb1YasX8uRVerZbDEuDYu5lMPCZFXFJw8bany1Esz2QXiOcdcWYmU 3/R0fH5lIcn9lDrWfU7WvV2t0+2TPrylTlYIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BJ+v55yUFiLI/4g7mFYq1QZLgbrpUXzZ9wJ+9sDmYqY=; b=wSlpAZjhAk2tq57N6C3YKbef/CEg6Cd8PHokF+67D3sQvNUWOtqpfS+JlLm5VRLSGB 2/L169/aOZY2bR/wUOkldpaTKRD36rKa/T7DQxcsXD0ey2n0gcW690VW8W0WFFYucAb/ 4cNam4vh3UlPXuYJNLgQB+JORgR8nPHeeaXrJs/Cibm69jvYCk/fBV9ddtibYOYIoWzE hj0lAFARBcsuLlTo14YMzSmcg7eOuznp/W3cxmvUtbn1OH1kiJXFf3mVof5nqo/c3Grr Dg4EuxgweLPKGLr4v4UolUpkWeJ9IRd7UWzlp1w7JcEOoXx7P1YNWz9Sy4AYC3KcFX0F Ia7g== X-Gm-Message-State: AOAM5313df7P1+ffKW6zICpuB4OnnzHV2a393Y0n0eane+7tGdIUGyTn vayiBN0i3WHQqWiDiQgISNu56QsaRPJaNknv0Mc= X-Google-Smtp-Source: ABdhPJysPYRMuu6IK0k6oVCaweSaBdNL0KKN2ernmvYpSH9Zci6AJc2xrvIpZjUbC+NWtOSjZL1NIg== X-Received: by 2002:a05:6402:1691:: with SMTP id a17mr50552912edv.109.1641332417444; Tue, 04 Jan 2022 13:40:17 -0800 (PST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com. [209.85.128.47]) by smtp.gmail.com with ESMTPSA id b10sm15084213ede.52.2022.01.04.13.40.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 13:40:17 -0800 (PST) Received: by mail-wm1-f47.google.com with SMTP id a83-20020a1c9856000000b00344731e044bso2165571wme.1 for ; Tue, 04 Jan 2022 13:40:17 -0800 (PST) X-Received: by 2002:a05:600c:4f13:: with SMTP id l19mr243370wmq.152.1641332405774; Tue, 04 Jan 2022 13:40:05 -0800 (PST) MIME-Version: 1.0 References: <20220104202227.2903605-1-yuzhao@google.com> <20220104202227.2903605-10-yuzhao@google.com> In-Reply-To: <20220104202227.2903605-10-yuzhao@google.com> From: Linus Torvalds Date: Tue, 4 Jan 2022 13:39:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 9/9] mm: multigenerational lru: Kconfig To: Yu Zhao Cc: Andrew Morton , 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 , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Linux-MM , page-reclaim@google.com, "the arch/x86 maintainers" , Konstantin Kharlamov Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=dshp9e3z; spf=pass (imf11.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.50 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspamd-Queue-Id: A040040007 X-Stat-Signature: jacmrzz9o8uauagk58dbo991xnrnk8ti X-Rspamd-Server: rspam04 X-HE-Tag: 1641332414-401033 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 4, 2022 at 12:23 PM Yu Zhao 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