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 48C16C433EF for ; Mon, 21 Mar 2022 19:18:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C08B86B0071; Mon, 21 Mar 2022 15:18:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB7C06B0073; Mon, 21 Mar 2022 15:18:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A58676B0074; Mon, 21 Mar 2022 15:18:02 -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 967A56B0071 for ; Mon, 21 Mar 2022 15:18:02 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 49ABE8249980 for ; Mon, 21 Mar 2022 19:18:02 +0000 (UTC) X-FDA: 79269353604.28.E219B3D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf24.hostedemail.com (Postfix) with ESMTP id BE20C18003D for ; Mon, 21 Mar 2022 19:18:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647890281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uvhBps1UXtsrc+nGVheIq+OQ/K59QvLDMVnB+No/i7I=; b=Iih7Fq3PGMwodkqT4gVMLdRP75eI3P7sIuSpS7/MHnQeNTy/mGaWgM/HhKNPt47oHBH+rd G+P50K+MhiOud1g69qcGwIzLbjZflybk3diZo4gZ3yFFg3hZgxETBUicVZW3Et/KRP1Qpj P+/VC05c68V1qM7i8J4Sx5bkfp2LhcA= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-85-zhhiRO1KNfWDYNUhHaSTTg-1; Mon, 21 Mar 2022 15:17:59 -0400 X-MC-Unique: zhhiRO1KNfWDYNUhHaSTTg-1 Received: by mail-qt1-f199.google.com with SMTP id m21-20020ac86895000000b002e1f19fae99so7513248qtq.18 for ; Mon, 21 Mar 2022 12:17:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=uvhBps1UXtsrc+nGVheIq+OQ/K59QvLDMVnB+No/i7I=; b=2EIFLNQR7B8zuWhn8araiVxYgqmXR0/i1Da0L3ssBK6Z38G7vFp5HdMdrXUBOSjhlv nFPe+zGbLI+vR4oLp4DlAwuKwWueNoLzcWJrTohMs5buxJ2YZsjd5Q18tvMLiIy5nzeJ 9Kypq3uoZeKxnm8vraU7gWgwCqX45nb700DKmv9HPkjaEc/XrsV7bWI6rxr4ldQxQIyY O/iLgAv4VFvOU1OO66xzsoI6K5vr0L2GiVWIBmUmFjPVKocGlvIA1yOYwjFV9katto1c 9adotmFag1HWBnZj0+pIlfqRnwY4m8muptEeECkHvNnD6MX3UNDLbLCd0+xGct+B+luw SILg== X-Gm-Message-State: AOAM532jrFz+MGGP7X5gHrLWWd9VyyiFv3db4Ka3RKLBVMgwJjfvbwBU WvqtfJRuH2EntuDVZrn45DfhzSScMq1GWAdk9B1RPb1aFclyjyj25yKJrP6IG1G/xwZI6pWPGyQ PC0BU7mtMgp8= X-Received: by 2002:a05:622a:50d:b0:2e2:1006:35b6 with SMTP id l13-20020a05622a050d00b002e2100635b6mr6045852qtx.536.1647890278936; Mon, 21 Mar 2022 12:17:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT6OD/Y0C23YFhyuuCC1pdsNk4eMbxjtnCENsX9okSWpzu6X4wl532+Yylnnt9cpM9agH2sw== X-Received: by 2002:a05:622a:50d:b0:2e2:1006:35b6 with SMTP id l13-20020a05622a050d00b002e2100635b6mr6045807qtx.536.1647890278574; Mon, 21 Mar 2022 12:17:58 -0700 (PDT) Received: from [10.16.222.26] (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id t1-20020a05620a0b0100b0067d3ac00982sm7944596qkg.57.2022.03.21.12.17.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 12:17:57 -0700 (PDT) Message-ID: Date: Mon, 21 Mar 2022 15:17:54 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v9 05/14] mm: multi-gen LRU: groundwork To: Justin Forbes , Yu Zhao Cc: Andi Kleen , kernel-team@lists.ubuntu.com, Vaibhav Jain , Rik van Riel , Mel Gorman , Catalin Marinas , Johannes Weiner , Aneesh Kumar , Brian Geffon , "open list:DOCUMENTATION" , Jesse Barnes , Sofia Trinh , "Huang, Ying" , linux-kernel , Steven Barrett , Shuang Zhai , Donald Carr , Oleksandr Natalenko , =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= , Will Deacon , Dave Hansen , Jonathan Corbet , Mike Rapoport , Andrew Morton , Jens Axboe , Hillf Danton , Michal Hocko , kernel , Suleiman Souhlal , Daniel Byrne , the arch/x86 maintainers , Konstantin Kharlamov , Matthew Wilcox , Linus Torvalds , Michael Larabel , Linux-MM , Kernel Page Reclaim v2 , Jan Alexander Steffens , Linux ARM References: <20220309021230.721028-1-yuzhao@google.com> <20220309021230.721028-6-yuzhao@google.com> <875yoh552i.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Prarit Bhargava In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: BE20C18003D Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Iih7Fq3P; spf=none (imf24.hostedemail.com: domain of prarit@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=prarit@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: X-Stat-Signature: j61n7rqjyh3rxs9t539rrebdt6yizkph X-HE-Tag: 1647890281-27794 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 3/21/22 14:58, Justin Forbes wrote: > 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. It is not 0. I've seen data from large systems (1000+ logical threads) that are running Fedora albeit with a modified Fedora kernel. Additionally the max limit for CPUS in RHEL is 1792, however, we have recently had a request to *double* that to 3584. You should just assume that number will continue to increase. P. > > Justin > >> [1] https://lore.kernel.org/lkml/20131106055634.GA24044@gmail.com/ >> > _______________________________________________ > kernel mailing list -- kernel@lists.fedoraproject.org > To unsubscribe send an email to kernel-leave@lists.fedoraproject.org > Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org > Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure