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 0C5D92472A6 for ; Fri, 27 Feb 2026 14:16:39 +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=1772201801; cv=none; b=YYDZgMLQdVVW8CJibNMiMDqlUv1MS+TUfpvDjBQKaCDaS+izbF0GGnQlDDyb55X+xe1TUP9X/kyRjDVKOzXAXO1jR8EzSAyK/VwHG6rXbxUO/Eq9xpB/Yb/BJGUruCE1Qf77KJbyu28Iu80j3uEWjdK08T/E/BeRU6d52rEHa84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772201801; c=relaxed/simple; bh=y/afpkqGa3SaG6phn9Mk7swIMM2t4cvaZCOGB22CcOI=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=GM+B8OT5YXZ9csLtlkL48f4cIf5fLygEPiaIvYbkkEGraoz3ngvesl2pMaD7ArYyQQ2bp5eJFTGNvglqMYKy3/Pufx46Qd4wpogA53KyPHQcjLRI4VyKdCzdfbXQ+NIPp6LKwfhlqxa9Q0x2bOcc7nbmTX70XoAlfjopyf9CJ2A= 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 1BFC714BF; Fri, 27 Feb 2026 06:16:33 -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 490E13F62B; Fri, 27 Feb 2026 06:16:38 -0800 (PST) Message-ID: <5071eea1-97f6-45d7-aad0-b109080f3032@arm.com> Date: Fri, 27 Feb 2026 14:16:36 +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] arm_mpam: Fix MPAM reset on resctrl unmount by clearing in_reset_state From: Ben Horgan To: Zeng Heng , catalin.marinas@arm.com, tan.shaopeng@jp.fujitsu.com, james.morse@arm.com, reinette.chatre@intel.com, fenghuay@nvidia.com, jonathan.cameron@huawei.com Cc: linux-kernel@vger.kernel.org References: <20260213075054.1574546-1-zengheng4@huawei.com> <16ac4ebe-123f-4e43-9930-bf3d6f17f31c@arm.com> Content-Language: en-US In-Reply-To: <16ac4ebe-123f-4e43-9930-bf3d6f17f31c@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/17/26 15:59, Ben Horgan wrote: > Hi Zeng, > > On 2/13/26 07:50, Zeng Heng wrote: >> When resctrl is unmounted, MPAM components should be reset to default >> configurations to avoid impacting system performance. However, after >> a user updates MPAM configuration via mpam_apply_config(), the >> in_reset_state flag remains true, causing mpam_reset_ris() to skip >> the actual register restoration on subsequent resets. >> >> For example, after mounting resctrl and modifying the root group's >> schemata (e.g., changing MBMAX/MBMIN values), unmounting resctrl > > nit: MBMIN isn't currently supported in resctrl. I'd just drop the > part in brackets. > >> would leave the modified MPAM settings in hardware registers since >> mpam_reset_ris() returns early due to in_reset_state still being true. >> This results in persistent performance restrictions even after resctrl >> is umounted. >> >> Fix by clearing in_reset_state to false immediately after successful >> configuration application, ensuring that the next reset operation >> properly restores MPAM register defaults. >> >> Fixes: f188a36ca241 ("arm_mpam: Reset MSC controls from cpuhp callbacks") > > mpam_apply_config() doesn't exist in this commit. I would have expected: > Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") > >> Signed-off-by: Zeng Heng > > The change and justification looks good to me. > > Acked-by: Ben Horgan > I'll add this on to the start of the current mpam resctrl series as even though this is squashing an existing bug it can't be hit until mpam has a user interface and so doesn't need to go as a fix. Thanks, Ben