From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9D8B30DD0A for ; Mon, 12 Jan 2026 16:45:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768236362; cv=none; b=k7nfjtGGnupm3dhNDZ9eFOPtkhwLJ5OXwdJFH1o4Aioibo1XcnNe/HXvFIEESX6F0ktXyoaj7gMRnpFu4EZRboEsJ9Voo9S44USTU5+8G1hbmelzosiG1oSFnGXmWJfUczo6LrlKN8EVKAHaD22PJMFb1RXq2vXsz8YzB4b7H+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768236362; c=relaxed/simple; bh=V9n3/b41okkgq5OYMtIUAnW35o5EQjM/7E/5PAAvxyw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oyorbV72Zm8wnHVcSUUwLo6PttbvpTri03x8N9yk2Aucn2cVreQpzf3zQf/W+bLS+Ufkzg09tZ5lpWG8YqZfTCtli/qH8p2Rj8kJUrv1Nbu+RpblmI+VtkDXjQGQmpKiZKJZr2L/gbFNBMCSFXgNLgC06bVN+TF9m6YXs5sCKmQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 63C03497; Mon, 12 Jan 2026 08:45:49 -0800 (PST) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 23FB13F59E; Mon, 12 Jan 2026 08:45:50 -0800 (PST) Message-ID: <02781a6f-fc15-4eef-8747-90dc2ba4e20c@arm.com> Date: Mon, 12 Jan 2026 16:45:49 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 25/45] arm_mpam: resctrl: Add support for 'MB' resource To: "Shaopeng Tan (Fujitsu)" Cc: "amitsinght@marvell.com" , "baisheng.gao@unisoc.com" , "baolin.wang@linux.alibaba.com" , "carl@os.amperecomputing.com" , "dave.martin@arm.com" , "david@kernel.org" , "dfustini@baylibre.com" , "fenghuay@nvidia.com" , "gshan@redhat.com" , "james.morse@arm.com" , "jonathan.cameron@huawei.com" , "kobak@nvidia.com" , "lcherian@marvell.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "peternewman@google.com" , "punit.agrawal@oss.qualcomm.com" , "quic_jiles@quicinc.com" , "reinette.chatre@intel.com" , "rohit.mathew@arm.com" , "scott@os.amperecomputing.com" , "sdonthineni@nvidia.com" , "xhao@linux.alibaba.com" , "catalin.marinas@arm.com" , "will@kernel.org" , "corbet@lwn.net" , "maz@kernel.org" , "oupton@kernel.org" , "joey.gouly@arm.com" , "suzuki.poulose@arm.com" , "kvmarm@lists.linux.dev" , Zeng Heng References: <20251219181147.3404071-1-ben.horgan@arm.com> <20251219181147.3404071-26-ben.horgan@arm.com> From: Ben Horgan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Shaopeng, On 1/8/26 10:42, Shaopeng Tan (Fujitsu) wrote: > Hello Ben, > >> From: James Morse >> >> resctrl supports 'MB', as a percentage throttling of traffic somewhere >> after the L3. This is the control that mba_sc uses, so ideally the class >> chosen should be as close as possible to the counters used for mba_local. >> >> MB's percentage control should be backed either with the fixed point >> fraction MBW_MAX. The bandwidth portion bitmaps is not used as its tricky >> to pick which bits to use to avoid contention, and may be possible to >> expose this as something other than a percentage in the future. >> >> CC: Zeng Heng >> Co-developed-by: Dave Martin >> Signed-off-by: Dave Martin >> Signed-off-by: James Morse > >> Signed-off-by: Ben Horgan >> --- >> drivers/resctrl/mpam_resctrl.c | 212 ++++++++++++++++++++++++++++++++- >> 1 file changed, 211 insertions(+), 1 deletion(-) >> [...] >> static int mpam_resctrl_control_init(struct mpam_resctrl_res *res, >> enum resctrl_res_level type) >> { >> struct mpam_class *class = res->class; >> + struct mpam_props *cprops = &class->props; >> struct rdt_resource *r = &res->resctrl_res; >> >> switch (r->rid) { >> @@ -361,6 +531,20 @@ static int mpam_resctrl_control_init(struct mpam_resctrl_res *res, >> * 'all the bits' is the correct answer here. >> */ >> r->cache.shareable_bits = resctrl_get_default_ctrl(r); >> + break; >> + case RDT_RESOURCE_MBA: >> + r->alloc_capable = true; >> + r->schema_fmt = RESCTRL_SCHEMA_RANGE; >> + r->ctrl_scope = RESCTRL_L3_CACHE; > > Could you please elaborate why RESCTRL_L3_CACHE is required here? The location of the mba control in resctrl is named using the id of the l3 cache and so needs to associated with it. James is working on some documentation that will mention this along with other things. > > Best regards, > Shaopeng TAN > Thanks, Ben