Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3613351rdh; Thu, 28 Sep 2023 18:13:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEz1D2Ix2OJNgIpEZHuF+Q5eNTD5v+I+vravb4it7QDllUErFfBAvBgcgwV4Q4FhC+rkiXJ X-Received: by 2002:a17:902:7596:b0:1c7:25fd:661f with SMTP id j22-20020a170902759600b001c725fd661fmr2771466pll.42.1695949986469; Thu, 28 Sep 2023 18:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695949986; cv=none; d=google.com; s=arc-20160816; b=x7r3vRVR0d6pVu6cI0R492hWuUX9X75vsqwBJ/ab4F3BtUf5VGXGy7+LDcvLWZZYKT Kw8xYwWLbrcomaANFeYXGlP547k2Yb32zcTMPmqMU5yz7Z/emSMXBlQInYf0WU4Q9H5D iuD0hYMdUJ4O9Bn+iasVTPL9v77DLFvcG4v4tRxPxsbO7QyIj/BX7JMS/p6db6HLvPAL yMcmGJVc6YD4AQ0WN+rMjwG+mgdf5lM87I4dX1tiSJWSIYDdNeLVO+CcqO6TCtVFfTfo RpmPhMqUJSu7wWO3tEJWBirGbZoom/c14hrQYJGvMmFV159px9csiFLRNZaJK6d45uGR ABPQ== 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:dkim-signature; bh=K9ffNT0FLQispKVfSI5aREex4aavST66R2FSBW+o61Y=; fh=hBumMKgdp07rd33RvRRiOkGat7EEsmGW7/N2mfIMmX8=; b=X+I2qnCSCaPgVaP5+lww5Q78jk8r1GUkgRMsevh0cxzILYGsDzM5dfH5jm307Aofw1 O7hmQ4aMzGftTzlLjM9AMOf0wCU9BXlsl35Ta660abDqWVIvrIWdzJEa/TvvOpmD+l8n TEKDlVXl4rfbl41I+EsNcEz/MHPV1oKm7wt6Q6uddGYoxi6SiyfopTXDvOJcz/mScJcH WyoxYTbbdhuyoumsida1X6PXEZVD5eu6ysynVhjoBfVEF/TolJEH4aCSpS1LwBZ5gSUP R7p8KwWWWcuG9MAtkR+icafOA1E3MLvRgMZ4aqt4DlmK3q+/hME8glzCleP6A8/fV7ep jc+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SjeLVCzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id le6-20020a170902fb0600b001c62b659f98si9315835plb.79.2023.09.28.18.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 18:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SjeLVCzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 10C1A8374AD9; Thu, 28 Sep 2023 10:42:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232143AbjI1RmV (ORCPT + 99 others); Thu, 28 Sep 2023 13:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231332AbjI1RmU (ORCPT ); Thu, 28 Sep 2023 13:42:20 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E262519F; Thu, 28 Sep 2023 10:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695922938; x=1727458938; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZmWiv8koCdgEaKyqb2PP0KPJ/k/z0XH5u1RDsqv8y/s=; b=SjeLVCzs7x05eaVWcAhpFCMOFbdfKJ7uqK2O+A1BadCGSPiZOi0I9wjo LX4jZEgYmAcZcvhQ/Bu1YpIQMPAgBBpvGXFvphNmGlY0n+U6QAgSos5o2 MS+fhrENHbDjUR7glXSgW3i1KdMt2o4EA16WPHdE2cgcu87j1LPQ0Gndv iPPibgVygrBzybVPRmYh8NrVyS0wLNj07ALxRrH3yvDILTdR+S5s8A7e2 hfIbBVFilopdcr8LW52q9ZrHIgpLX71hXlTPrxrtPAV0Om1zILmhnHJDQ 88bCjOQIDVMn9KIQFXBh+xlmA5mjzb6saLpYY0QESXYWooXep5rwd5f9o Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="446279420" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="446279420" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 10:42:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="815306493" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="815306493" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 10:42:16 -0700 Date: Thu, 28 Sep 2023 10:42:14 -0700 From: Tony Luck To: Reinette Chatre Cc: Fenghua Yu , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v5 4/8] x86/resctrl: Add node-scope to the options for feature scope Message-ID: References: <20230722190740.326190-1-tony.luck@intel.com> <20230829234426.64421-1-tony.luck@intel.com> <20230829234426.64421-5-tony.luck@intel.com> <5d93f726-bd43-20ad-5057-1de575809cde@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d93f726-bd43-20ad-5057-1de575809cde@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 10:42:34 -0700 (PDT) On Mon, Sep 25, 2023 at 04:25:54PM -0700, Reinette Chatre wrote: > Hi Tony, > > On 8/29/2023 4:44 PM, Tony Luck wrote: > > Currently supported resctrl features are all domain scoped the same as the > > scope of the L2 or L3 caches. > > fyi ... this patch series seems to use the terms "resctrl feature" > and "resctrl resource" interchangeably and it is not always clear > if the terms mean something different. I think a "resctrl feature" is a h/w control or monitor feature. A "resctrl resource" is "struct rdt_resource" (which may have more than one "resctrl feature" attached to it. E.g. the RDT_RESOURCE_L3 resource has L3 CAT, MBM, CQM attached). > > > > > Add "node" as a new option for domain scope. > > Could the commit message please get a snippet about what "node" > represents and why this new scope is needed? Yes. I've added a note. > > > Signed-off-by: Tony Luck > > --- > > include/linux/resctrl.h | 1 + > > arch/x86/kernel/cpu/resctrl/core.c | 2 ++ > > 2 files changed, 3 insertions(+) > > > > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > > index 08382548571e..f55cf7afd4eb 100644 > > --- a/include/linux/resctrl.h > > +++ b/include/linux/resctrl.h > > @@ -163,6 +163,7 @@ struct resctrl_schema; > > enum resctrl_scope { > > RESCTRL_L3_CACHE, > > RESCTRL_L2_CACHE, > > + RESCTRL_NODE, > > }; > > > > /** > > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > > index 3e08aa04a7ff..9fcc264fac6c 100644 > > --- a/arch/x86/kernel/cpu/resctrl/core.c > > +++ b/arch/x86/kernel/cpu/resctrl/core.c > > @@ -514,6 +514,8 @@ static int get_domain_id_from_scope(int cpu, enum resctrl_scope scope) > > return get_cpu_cacheinfo_id(cpu, 3); > > case RESCTRL_L2_CACHE: > > return get_cpu_cacheinfo_id(cpu, 2); > > + case RESCTRL_NODE: > > + return cpu_to_node(cpu); > > default: > > WARN_ON_ONCE(1); > > break; > > > Reinette