From nobody Tue Oct 7 08:58:03 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 9821323184A for ; Fri, 11 Jul 2025 23:53:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752278040; cv=none; b=O/U55Uts+Q8GAd3HEaqVzvsEcc0/Se6yO4VMCYkC+5B7IpCtESqTwvviUZz0KwS3YFQBXLQX6x8T10j84fp5Cy5t7qJA2oyabqRAo/dJQIuuqm3bTYFt+xAfpSxbP+EVG8DxAVjO3yT2tFvrCNNIIYIjcxGUDzg/K+/QSz2garU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752278040; c=relaxed/simple; bh=iQQaAtaHx0mDNf81FjxCBVvAs7w7HiRZ+ibkQ0O1rgE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C5sSjFO32myCBC6NK/mlXN03+qVN2tu9iz+1O7+rYIFtCAA5a89zmCqpGpNqAYpltzxGKqVxZyz4TMQv9vgOPIgrY6CK98+kVBB1/I9xJXIS+XPpZ5ej/cbxcmL0npk1h5ot/A6JiqHf9ZT0d8FeuZjh/3zTS3oVVG6ClkDkFGE= 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=htKK84SO; arc=none smtp.client-ip=198.175.65.20 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="htKK84SO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1752278038; x=1783814038; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iQQaAtaHx0mDNf81FjxCBVvAs7w7HiRZ+ibkQ0O1rgE=; b=htKK84SOTX+iNRHwRgd0Oe7GDoQ2VXc0NIVohTXlmCl5eOH0U7HRVXpo EivzInxVO3YgCzdOQm4VsJznJQaD1z3gL7HBASMSmoKfAtf9a7aXKphen f/vmUekV5UjbRv0aZYwDY21x0RfemH8B6anG34vXvGLNdXvvbRiVngW4E nVp43pz6zNvq6yijLeOuC3Rdw1HObkC8cm6stx1KdcNBKqo5RmPKvTLmJ PxWn72VpHQTef/FzFsY4DpErWmSXNyKyT83HJ2ZiUiPlo8UQYxl8zgmyI 9pJUZ10oUjbqlijhu0SyVCu5qeEW8/cwiTYvmymQk2Q3moS1k9blAii8/ w==; X-CSE-ConnectionGUID: q5gdyxnmTIeC+w2G3xYiGw== X-CSE-MsgGUID: t3TbcYfXTryP80QRXbSzsg== X-IronPort-AV: E=McAfee;i="6800,10657,11491"; a="54292659" X-IronPort-AV: E=Sophos;i="6.16,305,1744095600"; d="scan'208";a="54292659" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2025 16:53:56 -0700 X-CSE-ConnectionGUID: w1JQLZFXQsy1BaqfbGtShw== X-CSE-MsgGUID: SsGLO6giTOC6iEU/MpLxQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,305,1744095600"; d="scan'208";a="155902119" Received: from agluck-desk3.sc.intel.com ([172.25.103.51]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2025 16:53:57 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Anil Keshavamurthy , Chen Yu Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v7 11/31] x86,fs/resctrl: Rename some L3 specific functions Date: Fri, 11 Jul 2025 16:53:18 -0700 Message-ID: <20250711235341.113933-12-tony.luck@intel.com> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250711235341.113933-1-tony.luck@intel.com> References: <20250711235341.113933-1-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All monitor functions are tied to the RDT_RESOURCE_L3 resource, so generic function names to setup and tear down domains makes sense. With the arrival of monitor events tied to new domains associated with different resources it would be clearer if these functions are more accurately named. Two groups of functions renamed here: Functions that allocate/free architecture per-RMID MBM state information: arch_domain_mbm_alloc() -> l3_mon_domain_mbm_alloc() mon_domain_free() -> l3_mon_domain_free() Functions that allocate/free filesystem per-RMID MBM state information: domain_setup_mon_state() -> domain_setup_l3_mon_state() domain_destroy_mon_state() -> domain_destroy_l3_mon_state() Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/core.c | 16 ++++++++-------- fs/resctrl/rdtgroup.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resct= rl/core.c index 46c5e2a7565d..304fe0b61e6d 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -363,7 +363,7 @@ static void ctrl_domain_free(struct rdt_hw_ctrl_domain = *hw_dom) kfree(hw_dom); } =20 -static void mon_domain_free(struct rdt_hw_l3_mon_domain *hw_dom) +static void l3_mon_domain_free(struct rdt_hw_l3_mon_domain *hw_dom) { int idx; =20 @@ -396,11 +396,11 @@ static int domain_setup_ctrlval(struct rdt_resource *= r, struct rdt_ctrl_domain * } =20 /** - * arch_domain_mbm_alloc() - Allocate arch private storage for the MBM cou= nters + * l3_mon_domain_mbm_alloc() - Allocate arch private storage for the MBM c= ounters * @num_rmid: The size of the MBM counter array * @hw_dom: The domain that owns the allocated arrays */ -static int arch_domain_mbm_alloc(u32 num_rmid, struct rdt_hw_l3_mon_domain= *hw_dom) +static int l3_mon_domain_mbm_alloc(u32 num_rmid, struct rdt_hw_l3_mon_doma= in *hw_dom) { size_t tsize =3D sizeof(*hw_dom->arch_mbm_states[0]); enum resctrl_event_id eventid; @@ -514,7 +514,7 @@ static void l3_mon_domain_setup(int cpu, int id, struct= rdt_resource *r, struct ci =3D get_cpu_cacheinfo_level(cpu, RESCTRL_L3_CACHE); if (!ci) { pr_warn_once("Can't find L3 cache for CPU:%d resource %s\n", cpu, r->nam= e); - mon_domain_free(hw_dom); + l3_mon_domain_free(hw_dom); return; } d->ci_id =3D ci->id; @@ -522,8 +522,8 @@ static void l3_mon_domain_setup(int cpu, int id, struct= rdt_resource *r, struct =20 arch_mon_domain_online(r, d); =20 - if (arch_domain_mbm_alloc(r->num_rmid, hw_dom)) { - mon_domain_free(hw_dom); + if (l3_mon_domain_mbm_alloc(r->num_rmid, hw_dom)) { + l3_mon_domain_free(hw_dom); return; } =20 @@ -533,7 +533,7 @@ static void l3_mon_domain_setup(int cpu, int id, struct= rdt_resource *r, struct if (err) { list_del_rcu(&d->hdr.list); synchronize_rcu(); - mon_domain_free(hw_dom); + l3_mon_domain_free(hw_dom); } } =20 @@ -658,7 +658,7 @@ static void domain_remove_cpu_mon(int cpu, struct rdt_r= esource *r) resctrl_offline_mon_domain(r, hdr); list_del_rcu(&d->hdr.list); synchronize_rcu(); - mon_domain_free(hw_dom); + l3_mon_domain_free(hw_dom); break; default: pr_warn_once("Unknown resource rid=3D%d\n", r->rid); diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index d93a8bf18792..2467db5bb5e8 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -4040,7 +4040,7 @@ static void rdtgroup_setup_default(void) mutex_unlock(&rdtgroup_mutex); } =20 -static void domain_destroy_mon_state(struct rdt_l3_mon_domain *d) +static void domain_destroy_l3_mon_state(struct rdt_l3_mon_domain *d) { int idx; =20 @@ -4096,13 +4096,13 @@ void resctrl_offline_mon_domain(struct rdt_resource= *r, struct rdt_domain_hdr *h cancel_delayed_work(&d->cqm_limbo); } =20 - domain_destroy_mon_state(d); + domain_destroy_l3_mon_state(d); out_unlock: mutex_unlock(&rdtgroup_mutex); } =20 /** - * domain_setup_mon_state() - Initialise domain monitoring structures. + * domain_setup_l3_mon_state() - Initialise domain monitoring structures. * @r: The resource for the newly online domain. * @d: The newly online domain. * @@ -4114,7 +4114,7 @@ void resctrl_offline_mon_domain(struct rdt_resource *= r, struct rdt_domain_hdr *h * * Returns 0 for success, or -ENOMEM. */ -static int domain_setup_mon_state(struct rdt_resource *r, struct rdt_l3_mo= n_domain *d) +static int domain_setup_l3_mon_state(struct rdt_resource *r, struct rdt_l3= _mon_domain *d) { u32 idx_limit =3D resctrl_arch_system_num_rmid_idx(); size_t tsize =3D sizeof(*d->mbm_states[0]); @@ -4177,7 +4177,7 @@ int resctrl_online_mon_domain(struct rdt_resource *r,= struct rdt_domain_hdr *hdr goto out_unlock; =20 d =3D container_of(hdr, struct rdt_l3_mon_domain, hdr); - err =3D domain_setup_mon_state(r, d); + err =3D domain_setup_l3_mon_state(r, d); if (err) goto out_unlock; =20 --=20 2.50.0