From patchwork Sat Mar 13 07:57:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Zhao X-Patchwork-Id: 12136593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8511EC433E6 for ; Sat, 13 Mar 2021 07:58:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2609564F1E for ; Sat, 13 Mar 2021 07:58:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2609564F1E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7B5308D0002; Sat, 13 Mar 2021 02:58:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 767B58D0001; Sat, 13 Mar 2021 02:58:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E0BF8D0002; Sat, 13 Mar 2021 02:58:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 40E038D0001 for ; Sat, 13 Mar 2021 02:58:15 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0EC22363D for ; Sat, 13 Mar 2021 07:58:15 +0000 (UTC) X-FDA: 77914098150.05.49719CD Received: from mail-qk1-f202.google.com (mail-qk1-f202.google.com [209.85.222.202]) by imf29.hostedemail.com (Postfix) with ESMTP id DD67FC770 for ; Sat, 13 Mar 2021 07:58:10 +0000 (UTC) Received: by mail-qk1-f202.google.com with SMTP id h126so19890310qkd.4 for ; Fri, 12 Mar 2021 23:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=uE7IkUDVFpC8s1yHDZEBmC5mjUj6EJwbkUDWk669ASY=; b=uXhx05PdjRvuFkUcjNWapddDUcA7Q5UwyJE/THSSQbBgSLQkmn7ajsUcb7ZmUjhauR /jgBj7/Odh6Ngd12GetPXsZawVQtDY3F/Xog0R3yIye6citJOlL5TJ+2wwf2gcYmueuQ WYDJiJoxC2qvezUikRORLJGGQFEDfwGtR7lOiuTnagaswHyGlY8OAHiBnbM2NFrUlS9F wuwz3bRewUhC6hOmirv0YN+eR4e/S0TxFsdjMMf1mOQtK0M77IA18i0YjomUSsNcZo01 GPjHMp59Yr0/XsqaDXOK5S+CA6611MojOlFbWTfafAQpXFIKwJXgkzUeIs9A5goZIWHY WCzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=uE7IkUDVFpC8s1yHDZEBmC5mjUj6EJwbkUDWk669ASY=; b=kRs1/KB4WSTDTK9wdOaP9AqkrzjWMvAKc2R2WgHKsnT/M+fIs95xiJIDdBoPBFTYqY NGTd72yc8WEpiOr2l5qH1rvG53udHPI95o1dcM/FQJ7s7tIai0wJ5xNuTA49Xl/UFg1e AAG5NpC4/bYg+VT0hQ3p9VmoULqIb2m5/xraJqhq2ZVZe4Rkqv/MMq+jtdB9C4F9bYnZ hMZCp72Xl2m28ZVZOZLNozQAxfxgB/2zXk/UWQOgZZyShIrQ5LcNUbbYM215NA1avplB s2abj4Ufi0ak1kWP5lIwy2UdfyHTM7QkYJ6j6OCj/W13FE/bHnZJ8eRRqJMJVJ2aixYA kWJQ== X-Gm-Message-State: AOAM532LK8JzEqaYuA2ptH8586KGzc0rMmX61bPeGjcA1u0Y8A6esini R3OsOr90mAoQB69ISTcNnw2Ls+/Nw/8+gWre9ITRyaXsmJUQOQ7Xu70Kf2GMyIlW2exmwXxMFby q6fMDyWrbntgAAsCo8toT33jJrC94hD8IDNzN2hVOgWzlHDzbCo9x0d0g X-Google-Smtp-Source: ABdhPJz7oVSCBhnoApkNm1wW85JMl4kSXploQGL6Mdvavu7deAd9Mg85kMswIg+jCkfg3Z/h90N99XOQmFk= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:f931:d3e4:faa0:4f74]) (user=yuzhao job=sendgmr) by 2002:a05:6214:1909:: with SMTP id er9mr1749542qvb.5.1615622293640; Fri, 12 Mar 2021 23:58:13 -0800 (PST) Date: Sat, 13 Mar 2021 00:57:46 -0700 In-Reply-To: <20210313075747.3781593-1-yuzhao@google.com> Message-Id: <20210313075747.3781593-14-yuzhao@google.com> Mime-Version: 1.0 References: <20210313075747.3781593-1-yuzhao@google.com> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog Subject: [PATCH v1 13/14] mm: multigenerational lru: Kconfig From: Yu Zhao To: linux-mm@kvack.org Cc: Alex Shi , Andrew Morton , Dave Hansen , Hillf Danton , Johannes Weiner , Joonsoo Kim , Matthew Wilcox , Mel Gorman , Michal Hocko , Roman Gushchin , Vlastimil Babka , Wei Yang , Yang Shi , Ying Huang , linux-kernel@vger.kernel.org, page-reclaim@google.com, Yu Zhao X-Stat-Signature: 95awzqiybt5oazooc5a1sihyy96yjwwd X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: DD67FC770 Received-SPF: none (flex--yuzhao.bounces.google.com>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from="<3lXBMYAYKCLAokpXQeWeeWbU.SecbYdkn-ccalQSa.ehW@flex--yuzhao.bounces.google.com>"; helo=mail-qk1-f202.google.com; client-ip=209.85.222.202 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615622290-73741 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: Add configuration options for multigenerational lru. Signed-off-by: Yu Zhao Reported-by: kernel test robot Reported-by: kernel test robot --- mm/Kconfig | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mm/Kconfig b/mm/Kconfig index 24c045b24b95..3a5bcc2d7a45 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -872,4 +872,33 @@ config MAPPING_DIRTY_HELPERS config KMAP_LOCAL bool +config LRU_GEN + bool "Multigenerational LRU" + depends on MMU + help + High performance multigenerational LRU to heavily overcommit workloads + that are not IO bound. See Documentation/vm/multigen_lru.rst for + details. + + Warning: do not enable this option unless you plan to use it because + it introduces a small per-process memory overhead. + +config NR_LRU_GENS + int "Max number of generations" + depends on LRU_GEN + range 4 63 + default 7 + help + This will use ilog2(N)+1 spare bits from page flags. + + Warning: do not use numbers larger than necessary because each + generation introduces a small per-node and per-memcg memory overhead. + +config LRU_GEN_ENABLED + bool "Turn on by default" + depends on LRU_GEN + help + The default value of /sys/kernel/mm/lru_gen/enabled is 0. This option + changes it to 1. + endmenu