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 60B6EC433F5 for ; Mon, 14 Mar 2022 09:30:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DA0A8D0002; Mon, 14 Mar 2022 05:30:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88A328D0001; Mon, 14 Mar 2022 05:30:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 751B38D0002; Mon, 14 Mar 2022 05:30:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 63CB78D0001 for ; Mon, 14 Mar 2022 05:30:45 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0AA1BA4DB3 for ; Mon, 14 Mar 2022 09:30:45 +0000 (UTC) X-FDA: 79242472008.28.747E891 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by imf02.hostedemail.com (Postfix) with ESMTP id 77EC480036 for ; Mon, 14 Mar 2022 09:30:44 +0000 (UTC) Received: by mail-vs1-f47.google.com with SMTP id t124so4639648vsb.7 for ; Mon, 14 Mar 2022 02:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KeEKIGDs9aXtMIhttJqsnMc0I5powM9Tr74wlg/y0N4=; b=lJ3K5cO3Dq2yUA9tXv+g2KWoRQVbUQykq7rgnVsvdNTinvfq2zVR/yeWcYQ91TJnvm tgEhlsMQRIGR3LbKXt1i7eQBVLAIwooq1wvCKm2WmQ2slDHMaRu8xBxhaCBW482uRynU tE+hG69ChaKdnzLD1jMRGbnyP3MSuZlba7K1c7cBgQ5reXpaOdLgSh1wX9mVgBnrxEjI ymH2dl4bqWPZnYxoIjbGUbAD/bhuCjtJw7SN/Ra74Q7+T2YdUCqmV+O+K8TDvAh4HQ19 0V+5K6ZMorsvLVs706dbT3zQzir4kkgQWkOXYGnJYffXDPM5a/UOKqy/Mr+hk6gKXtbQ /h0w== 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=KeEKIGDs9aXtMIhttJqsnMc0I5powM9Tr74wlg/y0N4=; b=595qi3G31r8/qrCMKhcybQ+mwlF4Sc+19RJ5NhWhJSv27h3aKlTXlKJW3Tbsp4gEB1 49z1UFCAzwlj9dkk21LWpQGRz05OmLhhJvko9QLOxU5A775JbEtvrEN5jVUL+hmx9uys yJYiftPW0mBisfecRKepNFiLIodumFEgken8/kWJcjL+ERhCxeuWJdKttlkqD5qXM9qN s3ZB56QZnU6OqGfcggmfG8iQwJdQkJtBQWSee/ySwnCEL/TwBYl9w7lfi1cMl8gzzwtK uRpjCTz2g4d1tRbhEpAwTSuXHxLIfhNuNM1rgP7FBe9Zu+T2M+pHDN48nlfejaWSMe6T JT4w== X-Gm-Message-State: AOAM532mLMCJieP8Ex5zSyGktX3fTgOIjnS35xHHXojwkQjcZ4BJ2NDl xBOBCQ43ziHx//QEn1X7w6IbQwoDuQWQiVrphgM2Lg== X-Google-Smtp-Source: ABdhPJysb3Sw3/ukECu2h8EIWocceI4MckxeGuz3tnGwSYqea1336M0S1Iw+cCwN7NQ7GEwY+pua/xA+S5ZNz8vIosY= X-Received: by 2002:a05:6102:290c:b0:322:b864:22f5 with SMTP id cz12-20020a056102290c00b00322b86422f5mr6266141vsb.41.1647250243519; Mon, 14 Mar 2022 02:30:43 -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: <875yoh552i.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Yu Zhao Date: Mon, 14 Mar 2022 03:30:31 -0600 Message-ID: Subject: Re: [PATCH v9 05/14] mm: multi-gen LRU: groundwork To: "Huang, Ying" , kernel@lists.fedoraproject.org, kernel-team@lists.ubuntu.com Cc: 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-Stat-Signature: pr59t4o9ihoetzbj9mexat5zh975qj8i Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=lJ3K5cO3; spf=pass (imf02.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.47 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 77EC480036 X-HE-Tag: 1647250244-121186 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 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. [1] https://lore.kernel.org/lkml/20131106055634.GA24044@gmail.com/