Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2268782pxp; Mon, 21 Mar 2022 15:26:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzDbjn5pvlmjLR492qcpfAryBGqMre86oxEBGGvBM7Nc0U8H9navvPt2tN3htgleZ4s05T X-Received: by 2002:a17:90b:224d:b0:1bf:73a5:ff7f with SMTP id hk13-20020a17090b224d00b001bf73a5ff7fmr1414009pjb.164.1647901581209; Mon, 21 Mar 2022 15:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901581; cv=none; d=google.com; s=arc-20160816; b=d7kcyfPcBFO2KHB6LFGUYCMLggbcJ7MKXsjl0vjEeImTPFghYy/Hc87bj2Og5Gy/Rp zJhURHQCvg9maHAYsCN0q9gLMbZ/pzZwlX/yiBd+g2X5++KbUjBXjANsVnUNukTSyNJ5 cbOiX3a80WRi2t4sKuawXpLopvBKcQ1QQnma9CXk4qLCnXxddsza6vz1L458+M5BdHy0 dDLP306fx6IP5SZ0mRzjvjGOSnf4OMWyTaf6NQw1fZ1b/s9U/aynKAbGNSLCswdoOqVs 4pUaeSQTtfJI6BhLPjsADqo8eAKBWAulZ+EMuua6seCsEmY7/jzCill3E+rNgAy865pG dUhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=6aLAHA+A+XxV/kMRfZhDtEhgsmAuTureOTlZFDIWkzs=; b=GcIhRlAdcBkr2tK9zDFeMSfOF37Q8K9fjjYicYHZgE4yEl+W2ADHaQecoJ14iDF+4n +3xO0B9vD2B5tBFoVL9hlcPsksQgtkACKEqJDM9grdUQ6sT09FkvkIzzpbsfPIP7PAo1 ChLtymS3jTvYUGyGHRFozPI3+UyFcECudxWiglHRyVZwExa1CyuLd/INn/09UHpzaCj1 geUM/UrCHRebrux0udZL2pKO2seQdAUJXnBVJki+1bZKgScGEolTZ3s33wt+6bb+65kg 8Rehko2J4K4oRcaC/5B8NwGwfwEubMnU8O0HpFx2HwLZG1XPZ3k3yIcjP8t4d+Edgv1L O2eA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ck3-20020a17090afe0300b001bd14e03046si491770pjb.30.2022.03.21.15.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:26:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0187139B70B; Mon, 21 Mar 2022 14:40:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352365AbiCUS7s (ORCPT + 99 others); Mon, 21 Mar 2022 14:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240618AbiCUS7r (ORCPT ); Mon, 21 Mar 2022 14:59:47 -0400 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DADCBC2F for ; Mon, 21 Mar 2022 11:58:21 -0700 (PDT) Received: by mail-ej1-f52.google.com with SMTP id o10so12990513ejd.1 for ; Mon, 21 Mar 2022 11:58:21 -0700 (PDT) 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=6aLAHA+A+XxV/kMRfZhDtEhgsmAuTureOTlZFDIWkzs=; b=Qsq21hmRH+iqiYa4VSlncdY3qBfUF+dVsu8MilMIEA2eorfCCx7cGtihOezl2qXt3V bfgGzVJ4tD1Tgp0oQeenHZXex+a1238ZWyxhCPkJleMHuCdwx5fUEb6yNPxtka1n0PN3 24RS+BAoqoBunTWviDoBs1sy8Pvg0xzmlb527mXILgu+kMb2ybUOE99afXMx79REuSjR TuW44AjxeE7cy0loC3b7BkLkOP42dh5erFvvvXjLTSBlY6IfqZUbeRL3JFqOSk7BJyB7 R1cgRJozwVrIAIftjB/l9hvY7yhjHdZaoFBDuvzbq6UldlKUmqxX5C8oH5jee4r3L82V WwOg== X-Gm-Message-State: AOAM532f7WtGjRTgfGMHfknrR5DbRauc8jzq/XTtIdywt6iF2OLWNtwd Dvvw4iK8gXC7SkK3+TrScnpRMkCwt+uThIErbgydLQ== X-Received: by 2002:a17:907:3e98:b0:6d7:7c21:529f with SMTP id hs24-20020a1709073e9800b006d77c21529fmr22525233ejc.104.1647889098743; Mon, 21 Mar 2022 11:58:18 -0700 (PDT) MIME-Version: 1.0 References: <20220309021230.721028-1-yuzhao@google.com> <20220309021230.721028-6-yuzhao@google.com> <875yoh552i.fsf@yhuang6-desk2.ccr.corp.intel.com> In-Reply-To: From: Justin Forbes Date: Mon, 21 Mar 2022 13:58:07 -0500 Message-ID: Subject: Re: [PATCH v9 05/14] mm: multi-gen LRU: groundwork To: Yu Zhao Cc: "Huang, Ying" , kernel , kernel-team@lists.ubuntu.com, Andrew Morton , Linus Torvalds , Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Linux ARM , "open list:DOCUMENTATION" , linux-kernel , Linux-MM , Kernel Page Reclaim v2 , "the arch/x86 maintainers" , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2022 at 4:30 AM Yu Zhao wrote: > > On Mon, Mar 14, 2022 at 2:09 AM Huang, Ying wrote: > > > > Hi, Yu, > > > > Yu Zhao writes: > > > diff --git a/mm/Kconfig b/mm/Kconfig > > > index 3326ee3903f3..747ab1690bcf 100644 > > > --- a/mm/Kconfig > > > +++ b/mm/Kconfig > > > @@ -892,6 +892,16 @@ config ANON_VMA_NAME > > > area from being merged with adjacent virtual memory areas due to the > > > difference in their name. > > > > > > +# the multi-gen LRU { > > > +config LRU_GEN > > > + bool "Multi-Gen LRU" > > > + depends on MMU > > > + # the following options can use up the spare bits in page flags > > > + depends on !MAXSMP && (64BIT || !SPARSEMEM || SPARSEMEM_VMEMMAP) > > > > LRU_GEN depends on !MAXSMP. So, What is the maximum NR_CPUS supported > > by LRU_GEN? > > LRU_GEN doesn't really care about NR_CPUS. IOW, it doesn't impose a > max number. The dependency is with NODES_SHIFT selected by MAXSMP: > default "10" if MAXSMP > This combined with LAST_CPUPID_SHIFT can exhaust the spare bits in page flags. > > MAXSMP is meant for kernel developers to test their code, and it > should not be used in production [1]. But some distros unfortunately > ship kernels built with this option, e.g., Fedora and Ubuntu. And > their users reported build errors to me after they applied MGLRU on > those kernels ("Not enough bits in page flags"). Let me add Fedora and > Ubuntu to this thread. > > Fedora and Ubuntu, > > Could you please clarify if there is a reason to ship kernels built > with MAXSMP? Otherwise, please consider disabling this option. Thanks. > > As per above, MAXSMP enables ridiculously large numbers of CPUs and > NUMA nodes for testing purposes. It is detrimental to performance, > e.g., CPUMASK_OFFSTACK. It was enabled for Fedora, and RHEL because we did need more than 512 CPUs, originally only in RHEL until SGI (years ago) complained that they were testing very large machines with Fedora. The testing done on RHEL showed that the performance impact was minimal. For a very long time we had MAXSMP off and carried a patch which allowed us to turn on CPUMASK_OFFSTACK without debugging because there was supposed to be "something else" coming. In 2019 we gave up, dropped that patch and just turned on MAXSMP. I do not have any metrics for how often someone runs Fedora on a ridiculously large machine these days, but I would guess that number is not 0. Justin > [1] https://lore.kernel.org/lkml/20131106055634.GA24044@gmail.com/ >