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 D2A7E24BD0C; Thu, 9 Oct 2025 17:49:10 +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=1760032152; cv=none; b=BfNF8poaKd21Cl8rQeR9PjWAyedBpY1SSPpcmNVCriWe+rFMpGFJqszFLxhCRMRC/eicoJlFV31jiWr1ONbY6sTMxs3eThtBc+bcdADHCokF8hHAfN2/hdNDEuWd3xYWGCI6BN57FfBgF4sTs6/I2v7Kd7ZMajKge8SqwTrdwYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760032152; c=relaxed/simple; bh=rCCyUL1n8C/LxLIxlKKLczvB0F82tywLO6Pt9q7I8sY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a8XNP42ZsBSTVfhxYfP1jXOr1HBCc5UCSsun1RXf+WabE/0V3OHum/nOVqEj7WOvbAEPps/lXr0EkufVbukwqgXz5Ka9dk+OP5xX1mtHgVK0rMHEyuHDxk/j8PAjZJF1f6LFOSiI4L0r+CDvS8zsq/n35HA2BHJqlO9eUay10HI= 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 4A1342641; Thu, 9 Oct 2025 10:49:02 -0700 (PDT) Received: from [10.1.197.69] (eglon.cambridge.arm.com [10.1.197.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2EF543F66E; Thu, 9 Oct 2025 10:49:05 -0700 (PDT) Message-ID: Date: Thu, 9 Oct 2025 18:48:56 +0100 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 24/29] arm_mpam: Track bandwidth counter state for overflow and power management To: Jonathan Cameron Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, baisheng.gao@unisoc.com, Rob Herring , Rohit Mathew , Rafael Wysocki , Len Brown , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , Danilo Krummrich References: <20250910204309.20751-1-james.morse@arm.com> <20250910204309.20751-25-james.morse@arm.com> <20250912142419.00006c6d@huawei.com> Content-Language: en-GB From: James Morse In-Reply-To: <20250912142419.00006c6d@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Jonathan, On 12/09/2025 14:24, Jonathan Cameron wrote: > On Wed, 10 Sep 2025 20:43:04 +0000 > James Morse wrote: > >> Bandwidth counters need to run continuously to correctly reflect the >> bandwidth. >> >> The value read may be lower than the previous value read in the case >> of overflow and when the hardware is reset due to CPU hotplug. >> >> Add struct mbwu_state to track the bandwidth counter to allow overflow >> and power management to be handled. >> >> Signed-off-by: James Morse > Trivial comment inline. I haven't spent enough time thinking about this > to give a proper review so no tags yet. >> diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c >> index 1543c33c5d6a..eeb62ed94520 100644 >> --- a/drivers/resctrl/mpam_devices.c >> +++ b/drivers/resctrl/mpam_devices.c >> @@ -918,6 +918,7 @@ static void gen_msmon_ctl_flt_vals(struct mon_read *m, u32 *ctl_val, >> *ctl_val |= MSMON_CFG_x_CTL_MATCH_PARTID; >> >> *flt_val = FIELD_PREP(MSMON_CFG_x_FLT_PARTID, ctx->partid); >> + > Unrelated change. If it makes sense figure out where to push it back to. Done. This is may favourite mistake to make with a merge conflict! Thanks, James >> if (m->ctx->match_pmg) { >> *ctl_val |= MSMON_CFG_x_CTL_MATCH_PMG; >> *flt_val |= FIELD_PREP(MSMON_CFG_x_FLT_PMG, ctx->pmg); >