Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1118945rdb; Fri, 9 Feb 2024 10:46:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBBNbXXKZsRx96KkB4NSuu3WOeofJXGVXny/lyr3TZNeUOBtjuPUQ7dQGIRhnG/8Noz/yT X-Received: by 2002:a05:6a00:4b0a:b0:6e0:47b9:b727 with SMTP id kq10-20020a056a004b0a00b006e047b9b727mr97814pfb.30.1707504417926; Fri, 09 Feb 2024 10:46:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707504417; cv=pass; d=google.com; s=arc-20160816; b=Ap0hPDpDLs4Ha2BVJiQuWXEQ9YwSpNHbzF0apqGHkvuy8+RIoPwSrowhuXlmWmmQCT ppu0fhIklk3HzoZQFZstFCE3pwHOrGeW23V5oaixRnUTQSzV5rR5GVi6sOsT6D6o5AMJ hGFPaZRd900SBrf4XImc7PKSbvvQObqpnQGSgd60TGwZ7MVLp6SIR90D0irpEH18XQq7 vVZdrnM8O5Fd1Bk2JvhS1t7FtBo4nhVtRrRpYVMq0j/JnVm5HwwVrp2kpec2Wd5LQYN2 17xSEGl4NvMvI4Spn8LGApkDclFrFSHEvzTJYIVeP09tu0rP6lWNUJhC0OdyiYCJEmrM EakQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DPCr8sy3MzgusRNns3gSDQNGDA29KhomkHImG07Ygv0=; fh=lYUbDs9P8P130QCJ6h3BbO0PS0RsrgbK2hW8lyuuMyM=; b=d0eO++OvL0eAp17pEDc8eIuHrRDRnLrH8wmQNqliO66emrL726Mae7wljrgYZz1f47 6xkAJqNz9i4I0s5T3chRREbjQ0TGLE4FnJqrMyUgmq5APIHR5iLmQSPBaY7DksekG9WS Uyf7an/Df8DIHLt2pch4WSE2RwQticQtCQt8Cf+7nizfTSyCUDxDxhu2VLQh/ol0Gnsx npBGqE4whhOeNS8/Oc9OsCwnl3NnZScbcNWU8BX+T39QyVZYOMoj0/qg/T0I7n9hWkDJ +iY6XNhLEIRMvRCHW0lL733L8MCd1Sds8KAWpEYJEKjvBdoHXD3ZMhWBfNeonxcsViUl sKvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZjTEhcx7; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCX/wNjjKtCAu2O/sW8AJfuuMi/IfW4irNoLveEQ94ncL+VsRt/yq199X93Ndnpd++ow0t0j30k44f1ah5SZDjr8Xa54dmuwGkBLIPSC3g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l70-20020a638849000000b005d8bb44b20bsi2136924pgd.564.2024.02.09.10.46.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 10:46:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZjTEhcx7; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E307028C2FF for ; Fri, 9 Feb 2024 18:45:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EDB680BF8; Fri, 9 Feb 2024 18:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZjTEhcx7" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19B5457337; Fri, 9 Feb 2024 18:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707504303; cv=none; b=eW0UURqmFErzxSlACtyqFN++cMs05MI5CrTKILS8SIgL3kx/onogLtkylIOoDFDcI810ozQp9G3gpp/F2YTi/MZUtJpDlvsh9tadz/PhlYPkZlkczmEB1/2dTpqOOMmi6ZPuMRRl3wbBsCfEDZMot1djmbVpVfO8m9B1vWeAW9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707504303; c=relaxed/simple; bh=r99sVZ3dN5h4LRp+rYDgytD8f2JrBqu/IHxuwknZauQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=itYWu5A7QZ9OtM9lPnXP7AVWCWo314S770f5GZFzBx9K/n/w2Szs3yl4WfOcMKHC9U47X9kCISuQwLgj0rsw7APwIn/DCmMpuEr1Nnyvw+rBaovM+SfgWRheJ37JUWuV8tWclZjKeyXcZ9OSYGhegQ2K7h40E9f95UvfM1Hemjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZjTEhcx7; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707504301; x=1739040301; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=r99sVZ3dN5h4LRp+rYDgytD8f2JrBqu/IHxuwknZauQ=; b=ZjTEhcx77Zw/XJfD2MSOH93V0ZpzSXSkD3RD65nW4bgOcoZeoQVsxWpR URxmbc+rdCkLyPX4XwQLvTgXTZweVU3R4t2uWO4LYMEJ7UqnHZJAsBSCJ cZLDkB/hX0pp2Drd94ZAzCX7NQwufF+/1PcpxfTGfCDTgdi72t+QSYD/a iitoA3VLHOxj+gekdmfRUpCJJGUyWl0y2e2GmDlfvEolPcS4REN1CErBY 1KRQ4kmK4Zjqggrk2m7TVTLbjnXF6f+SpeGd8smWA41apx8k3UDp5MHNx uGlZDAz+MrW0ZkL/pVkOXI7Rxgd5YLtmjykBbKXMdS25vIBosCPRSJ8YG A==; X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="12568172" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="12568172" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 10:45:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="2042411" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 10:45:00 -0800 Date: Fri, 9 Feb 2024 10:44:58 -0800 From: Tony Luck To: "Moger, Babu" Cc: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Randy Dunlap , Drew Fustini , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v15-RFC 1/8] x86/resctrl: Split the RDT_RESOURCE_L3 resource Message-ID: References: <20240126223837.21835-1-tony.luck@intel.com> <20240130222034.37181-1-tony.luck@intel.com> <20240130222034.37181-2-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Feb 09, 2024 at 09:28:16AM -0600, Moger, Babu wrote: > > enum resctrl_res_level { > > + RDT_RESOURCE_L3_MON, > > RDT_RESOURCE_L3, > > How about? > RDT_RESOURCE_L3, > RDT_RESOURCE_L3_MON, Does the order matter? I put the L3_MON one first because historically cache occupancy was the first resctrl tool. But if you have a better argument for the order, then I can change it. > > RDT_RESOURCE_L2, > > RDT_RESOURCE_MBA, > > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > > index aa9810a64258..c50f55d7790e 100644 > > --- a/arch/x86/kernel/cpu/resctrl/core.c > > +++ b/arch/x86/kernel/cpu/resctrl/core.c > > @@ -60,6 +60,16 @@ mba_wrmsr_amd(struct rdt_domain *d, struct msr_param *m, > > #define domain_init(id) LIST_HEAD_INIT(rdt_resources_all[id].r_resctrl.domains) > > > > struct rdt_hw_resource rdt_resources_all[] = { > > + [RDT_RESOURCE_L3_MON] = > > + { > > + .r_resctrl = { > > + .rid = RDT_RESOURCE_L3_MON, > > + .name = "L3", > > L3_MON ? That was my first choice too. But I found: $ ls /sys/fs/resctrl/info L3 L3_MON_MON last_cmd_status MB This would be easy to fix ... just change this code to not append an extra "_MON" to the directory name: for_each_mon_capable_rdt_resource(r) { fflags = r->fflags | RFTYPE_MON_INFO; sprintf(name, "%s_MON", r->name); ret = rdtgroup_mkdir_info_resdir(r, name, fflags); if (ret) goto out_destroy; } But I also saw this: $ ls /sys/fs/resctrl/mon_data/ mon_L3_MON_00 mon_L3_MON_01 which didn't seem to have an easy fix. So I took the easy route and left the ".name" field as "L3_MON". -Tony