Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp302007rdb; Thu, 19 Oct 2023 05:12:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG27MTSmdAU+lbyTVV4/eW8npzGdF24vbguaF+B0fXkIzE4eyuK25Xnr2aa7jsxZ8ieKeeP X-Received: by 2002:a17:902:da8c:b0:1c3:4565:22f with SMTP id j12-20020a170902da8c00b001c34565022fmr2609424plx.21.1697717522384; Thu, 19 Oct 2023 05:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697717522; cv=none; d=google.com; s=arc-20160816; b=fekILD2WpXmbQOJoyzncKTEAqJtxYqbs4rANxhhTwcQX3UUziYanxTA+e0ZoC21/ZK 44pdhamOKgb4JJmxQxhAUHaaAsx8ukGtTjahKIsP5BNGqFz2D14+QoT1O02zNg8EyJsO 7nY2mWEwqfRG0Muj6puAwM5LaFHD7+7Zx4IEI0q53J9BAf0bv68bD22gTGUtE5MIOkId Uv2PuFkoPM41im5x7nC0QRkn58zvr8ju/Zty/M6G52B5yBlNf4L8I90CZHiEYCaVC33W bamhIBzz9ftdCz10nUfp8VwvUOsh6k6VaNYH9ImlwBony5uSkFrEie8Ugby6OIc+4wxS 7Krg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=KhA5m7j1qDozQkSAWjPIEcPWCsOgFkYvcnhOIwY4Rmc=; fh=Yy+LwuovBoMm6DeQB01xZwDnUVvOUjpW7ezb73Ie11Y=; b=WtW9nwl8qumA7hja+ofc9rDbgQx3X+zgqwGu28Nb4kYt30airpEUIZnigcvP2JFRrQ iBUG00ISU+vGH0RhjXWmQKpi0lMF2ObWlnEQeoF/+ByvCod/RuRC7cXtkjnmtY8fsjTB wsZNH7HdK2Z8IwV1zP5I0rZDiZbknBaPmh+FMZOlIs84esgkYqf970QVUYe2K3Pobk1b 3XEabHuOlMqpeHYkAHLHUac1P72XltXgfbBaQCKGwkOntWC9Qabz2U3fxXp6gtArfwgZ JfW8rTrVJRswITvIGD6Bu91/99X/B7xCWOTLcbPsVJ/vy2vaWCybb4nvtXq0uu7XzWVj pGHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id m11-20020a170902c44b00b001c1f1394bf9si1929130plm.357.2023.10.19.05.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:12:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 568D38191659; Thu, 19 Oct 2023 05:12:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345495AbjJSMLm (ORCPT + 99 others); Thu, 19 Oct 2023 08:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235396AbjJSMLX (ORCPT ); Thu, 19 Oct 2023 08:11:23 -0400 Received: from outbound-smtp43.blacknight.com (outbound-smtp43.blacknight.com [46.22.139.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA40121 for ; Thu, 19 Oct 2023 05:11:20 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp43.blacknight.com (Postfix) with ESMTPS id CE1072041 for ; Thu, 19 Oct 2023 13:11:17 +0100 (IST) Received: (qmail 17348 invoked from network); 19 Oct 2023 12:11:17 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.199.31]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 19 Oct 2023 12:11:17 -0000 Date: Thu, 19 Oct 2023 13:11:15 +0100 From: Mel Gorman To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Arjan Van De Ven , Sudeep Holla , Vlastimil Babka , David Hildenbrand , Johannes Weiner , Dave Hansen , Michal Hocko , Pavel Tatashin , Matthew Wilcox , Christoph Lameter Subject: Re: [PATCH -V3 2/9] cacheinfo: calculate size of per-CPU data cache slice Message-ID: <20231019121115.mwm6eroigcrr6bi4@techsingularity.net> References: <20231016053002.756205-1-ying.huang@intel.com> <20231016053002.756205-3-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20231016053002.756205-3-ying.huang@intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:12:00 -0700 (PDT) On Mon, Oct 16, 2023 at 01:29:55PM +0800, Huang Ying wrote: > This can be used to estimate the size of the data cache slice that can > be used by one CPU under ideal circumstances. Both DATA caches and > UNIFIED caches are used in calculation. So, the users need to consider > the impact of the code cache usage. > > Because the cache inclusive/non-inclusive information isn't available > now, we just use the size of the per-CPU slice of LLC to make the > result more predictable across architectures. This may be improved > when more cache information is available in the future. > > A brute-force algorithm to iterate all online CPUs is used to avoid > to allocate an extra cpumask, especially in offline callback. > > Signed-off-by: "Huang, Ying" Acked-by: Mel Gorman -- Mel Gorman SUSE Labs