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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1606CDB465 for ; Thu, 19 Oct 2023 12:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345523AbjJSMLn (ORCPT ); Thu, 19 Oct 2023 08:11:43 -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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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