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 897EDC433EF for ; Wed, 9 Mar 2022 00:03:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CA438D0002; Tue, 8 Mar 2022 19:03:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 17ADA8D0001; Tue, 8 Mar 2022 19:03:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 041978D0002; Tue, 8 Mar 2022 19:02:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id E9B3C8D0001 for ; Tue, 8 Mar 2022 19:02:59 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B3C9A207BD for ; Wed, 9 Mar 2022 00:02:59 +0000 (UTC) X-FDA: 79222897278.04.39DA45A Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf18.hostedemail.com (Postfix) with ESMTP id 48D141C0003 for ; Wed, 9 Mar 2022 00:02:59 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id h13so796832ede.5 for ; Tue, 08 Mar 2022 16:02:59 -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=BlWs9Oc0zj9F2EHZcLB2J8SiaLs42pAAB4ehhmuarrk=; b=VyN7JMo6vbO64BMsSBYP06buMY3DUlc/4kwNjhwQem2ii3W8SmgZmDvZRuhzbXEPVp /HoQ4b8wz2JqhUyXHzdsaMB1bfpsVDrJMOU4BtjIHOBsfN/2ug+NMcbeUV6LMBlcCDB2 sa7IwL82CQNufZu/wr3AhCP+cQFqC3WMqIC/Q= 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=BlWs9Oc0zj9F2EHZcLB2J8SiaLs42pAAB4ehhmuarrk=; b=422+gU1W6GWicCfLe0tFhEdpwpssru6swyHWYL1FJ9vJolhsA9oH+ANVQ/BILn4Z+f aip/J1rGNcSzMmKwtTr2J9ozeTkQhX/Vj2o1UU0nONnSPpEbG5RcReaIcOsmuitPAab2 oLTQNIPqwAegY75xnVH8JjksQS03RbX13W7BkkCvfqfZA3BM7rLNzJgKrRmLVwrOrVEr kB4j/guFE5M3l6udUSJCCtGaG8JKGgoubtCeBFRVVQaEJ5CQcHviniKvNQ/hUGfAQO4C tnltN3PudvLGHwg28W8uuWwaGb6D2C/wtduVTZRoaWWRvoFL9ofrla4Gsw2NN+cEh22h /Apg== X-Gm-Message-State: AOAM530tIMl/qRtY0dzFcP6DsRBrfx9vGPX/SjlijWa9e3S87S9juWIX tPvYAjQwmbP+NS2OcoVmEOtEuHlqWzA4jAhNnd8= X-Google-Smtp-Source: ABdhPJxrmt0eh6EcXnchJ0XFBt4CBq7WU0ilk7omL4Kuq/kxW0OyeomaBF5H0uEHeELYsRqlxrTJwA== X-Received: by 2002:a05:6402:5191:b0:40f:b9e0:4d1b with SMTP id q17-20020a056402519100b0040fb9e04d1bmr18694984edd.149.1646784177635; Tue, 08 Mar 2022 16:02:57 -0800 (PST) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com. [209.85.218.41]) by smtp.gmail.com with ESMTPSA id c4-20020a170906340400b006d077e850b5sm89451ejb.23.2022.03.08.16.02.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 16:02:57 -0800 (PST) Received: by mail-ej1-f41.google.com with SMTP id bg10so1402855ejb.4 for ; Tue, 08 Mar 2022 16:02:56 -0800 (PST) X-Received: by 2002:a05:6512:3049:b0:447:d55d:4798 with SMTP id b9-20020a056512304900b00447d55d4798mr12247526lfb.531.1646784166111; Tue, 08 Mar 2022 16:02:46 -0800 (PST) MIME-Version: 1.0 References: <20220308234723.3834941-1-yuzhao@google.com> <20220308234723.3834941-7-yuzhao@google.com> In-Reply-To: <20220308234723.3834941-7-yuzhao@google.com> From: Linus Torvalds Date: Tue, 8 Mar 2022 16:02:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 06/14] mm: multi-gen LRU: minimal implementation To: Yu Zhao Cc: Andrew Morton , 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 , Ying Huang , Linux ARM , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Linux-MM , page-reclaim@google.com, "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-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 48D141C0003 X-Stat-Signature: xip68xskf4gpqw6t45yo6raizxtfsnx6 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=VyN7JMo6; spf=pass (imf18.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.53 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspam-User: X-HE-Tag: 1646784179-209083 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, Mar 8, 2022 at 3:48 PM Yu Zhao wrote: > + > +config TIERS_PER_GEN > + int "Number of tiers per generation" > + depends on LRU_GEN > + range 2 4 > + default 4 > + help > + Do not decrease this value unless you run out of spare bits in page > + flags, i.e., you see the "Not enough bits in page flags" build error. > + > + This option uses N-2 bits in page flags. Exact same issue as with the previous patch. Don't ask things like this. Most *definitely* don't ask things like this if they can cause build errors. Just set the tiers to 4, and make sure that the number of generations is small enough that the "Not enough bits in page flags" build error just cannot happen. This kind of "ask people questions they cannot sanely answer" is not acceptable. And build errors that depend on configuration also aren't acceptable. End result: DO NOT DO THIS. The whole "ask user a question that you can't answer yourself" is an actively wrong cop-out. If you can't answer it, then the user sure as hell can't either, and the question is pure garbage and only results in more problems and less coherent testing. Linus