From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (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 0935B13AD26 for ; Sat, 28 Feb 2026 02:30:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772245847; cv=none; b=mSmTKoBnxBGd2Bk2QpBwlkrtHv/swVBzhFBn566t9EKU7qatnxNV9EPjGLiRcDksaf37DymNBHBmJWqc5BoUAOm/843XYsok57L1LL6SuWkRuaIejQtpNQSPcSNAHBhhEn8Cia1eE2y+pAmU7l3a85cAhvDwE38uBG8OFCehQ44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772245847; c=relaxed/simple; bh=rjAMMLkpnf34PDpHa54wO9jDGO/tu6UaNpRl6eaNMnc=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=KGSZplVJ+xUfRc8O598siwYWBtYTtL4OWV0nKER6r4NzOM0GFVmUsvdNgMVdAv4tCXJVTaO/5XVPnvvTfY/Ocfj6aweaDjP7Aniu1XvvnSiDzuvYTeyVQERsiXRESTtCWwZ+aek27jWADOTUTOCmOpq2thrgFCRnlZ1kYNQKMDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=Th3GnFPu; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="Th3GnFPu" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=r0lq+yA8DAjiwR6XtDYCLnBGYG3XwUBZd5Ca/kI4a0s=; b=Th3GnFPu3A0uy9UzJWweStfre/svQ8Zsvg5iR7c1pzyntZMoNMvvlUqDl10XaVns38uDoi+S0 TWlBHcuheUkQhlJ/+8EmnBBQioIK+qwavjICm2RfBx1pvCEsXmuC3qkkliE7dbKHF+60pCZ7JDE JE1UhIitwK22ZVU1MwM/OR4= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4fN8FQ3H48z12LDP; Sat, 28 Feb 2026 10:26:02 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 6960D2016A; Sat, 28 Feb 2026 10:30:41 +0800 (CST) Received: from [10.174.179.37] (10.174.179.37) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Sat, 28 Feb 2026 10:30:40 +0800 Message-ID: <1866de26-b9d5-7871-2e18-6dffeef48065@huawei.com> Date: Sat, 28 Feb 2026 10:30:40 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] arm_mpam: Fix MPAM reset on resctrl unmount by clearing in_reset_state Content-Language: en-US To: Ben Horgan , , , , , , CC: , Kefeng Wang , , References: <20260213075054.1574546-1-zengheng4@huawei.com> <16ac4ebe-123f-4e43-9930-bf3d6f17f31c@arm.com> <5071eea1-97f6-45d7-aad0-b109080f3032@arm.com> From: Zeng Heng In-Reply-To: <5071eea1-97f6-45d7-aad0-b109080f3032@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To kwepemf100008.china.huawei.com (7.202.181.222) Hi Ben, On 2026/2/27 22:16, Ben Horgan wrote: > > > 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 > > OK, get it. Best regards, Zeng Heng