From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout09.his.huawei.com (canpmsgout09.his.huawei.com [113.46.200.224]) (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 8A0713B38A4; Wed, 9 Sep 2026 08:51:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.224 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788943901; cv=none; b=Ylei3h9hA5/f1qyddDwctVjsS57mMejBsoE2v1/mTNm0v79stIqgXzUFLbIZ2sF2MTViJ37Ds2wcz5NHXlc5CIN49duwfMXmKiN7rnYSRWshid3LAAyoEO3OiMThJkzpS43V9f3Zkrs7oMQ9yOJF6rR3m//PO+fg8Qke2M+Uc0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788943901; c=relaxed/simple; bh=rmAfvRAxUOXqtAFM315JLQUWFOzi+wtWHpygUfIixQY=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=R2wRlhp3IrcWsjfVn/8jkYVfikYYccccNpm9QOWHXCMoUg8tiu1MiFZyNePbMtHG/eqD6eDfDIhyPGyVbubqEuy/oJ0NHK1bLocQmu9TChVYyctkE74C9yLY/KPU6Nko7oaPuBHzmkeH3A9IgnIPebZLVCV7kPkNJwR3q4o8FNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=u8EPErGc; arc=none smtp.client-ip=113.46.200.224 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="u8EPErGc" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=2ePDNUAfAQ3wJb48EOS828muxTyZ9V+mesfFPhrCI+k=; b=u8EPErGci2dvvoRgmrw/1JI+J0jvgL6nxVIbn+At4oieJ810pavVdUuK6Gcy9C7an7Eqt+64u zRc1aH84x3aTvAf74KPbpVZA4ImnJqhOwjJK7h+vTGVmUHd8w1cosIokO5AmSSMsAb9Oy1OUHDM gJxZs6XRc8LqQ1Eigc6jgps= Received: from mail.maildlp.com (unknown [172.19.163.214]) by canpmsgout09.his.huawei.com (SkyGuard) with ESMTPS id 4hfvQQ11X6z1cyPY; Wed, 9 Sep 2026 16:40:30 +0800 (CST) Received: from kwepemk200008.china.huawei.com (unknown [7.202.194.74]) by mail.maildlp.com (Postfix) with ESMTPS id C50F240580; Wed, 9 Sep 2026 16:51:23 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by kwepemk200008.china.huawei.com (7.202.194.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 9 Sep 2026 16:51:21 +0800 Message-ID: <4b1b136d-78fd-4629-8efd-08e750af2bc9@huawei.com> Date: Wed, 9 Sep 2026 16:51:20 +0800 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 01/40] arm_mpam: Ensure in_reset_state is false after applying configuration To: Ben Horgan CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260313144617.3420416-1-ben.horgan@arm.com> <20260313144617.3420416-2-ben.horgan@arm.com> From: Jinjie Ruan In-Reply-To: <20260313144617.3420416-2-ben.horgan@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems500002.china.huawei.com (7.221.188.17) To kwepemk200008.china.huawei.com (7.202.194.74) 在 2026/3/13 22:45, Ben Horgan 写道: > From: Zeng Heng > > The per-RIS flag, in_reset_state, indicates whether or not the MSC > registers are in reset state, and allows avoiding resetting when they are > already in reset state. However, when mpam_apply_config() updates the > configuration it doesn't update the in_reset_state flag and so even after > the configuration update in_reset_state can be true and mpam_reset_ris() > will skip the actual register restoration on subsequent resets. > > Once resctrl has a MPAM backend it will use resctrl_arch_reset_all_ctrls() > to reset the MSC configuration on unmount and, if the in_reset_state flag > is bogusly true, fail to reset the MSC configuration. The resulting > non-reset MSC configuration can lead to persistent performance restrictions > even after resctrl is unmounted. > > Fix by clearing in_reset_state to false immediately after successful > configuration application, ensuring that the next reset operation > properly restores MSC register defaults. > > Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") > Signed-off-by: Zeng Heng > Acked-by: Ben Horgan > [Horgan: rewrite commit message to not be specific to resctrl unmount] > Signed-off-by: Ben Horgan > --- > Subject was originally: > arm_mpam: Fix MPAM reset on resctrl unmount by clearing in_reset_state > --- > drivers/resctrl/mpam_devices.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c > index 1eebc2602187..0fd6590a9b5c 100644 > --- a/drivers/resctrl/mpam_devices.c > +++ b/drivers/resctrl/mpam_devices.c > @@ -2692,6 +2692,7 @@ int mpam_apply_config(struct mpam_component *comp, u16 partid, > srcu_read_lock_held(&mpam_srcu)) { > arg.ris = ris; > mpam_touch_msc(msc, __write_config, &arg); > + ris->in_reset_state = false; Reviewed-by: Jinjie Ruan > } > mutex_unlock(&msc->cfg_lock); > }