From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 947E0ECD983 for ; Thu, 5 Feb 2026 16:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AWBS11XumTBXTcNWvuISocP5BzzIcXFbvL/uaHNxL7I=; b=z658v4gPTCVBur82IVIJBBDLtR Ztlc24SmcnvvG5P/83so94hFCtLH1zBgfEbzIan03effdjFP7SETAW4NPrvltM7yeKUyWRueAGGO4 iAnMBm2dyU6p3y9zLhNxfKBQezg7Rj6G8WhhxG08i3QDYYjGJ2pVDrvntv0yVkUQR2ZEVWSXoeNzg FxpoxpIqkPXmQwLoxgTVLeIL9IxXMFx9R5bzK9QoNEqAKeclOKeHPDT1hGPVZhjw4gL0sNMfKwRyN d+H/0YvXhOlzsJKOSURH4vCbBMcAFAfw3AappGKkl6AZFoNHnlIMv4l9IG5AkjZSwLl3wXBQUvOLX H6OKw8MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vo2dQ-0000000AFlg-0qAC; Thu, 05 Feb 2026 16:55:16 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vo2dM-0000000AFlE-1mOz for linux-arm-kernel@lists.infradead.org; Thu, 05 Feb 2026 16:55:14 +0000 Received: from mail.maildlp.com (unknown [172.18.224.83]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4f6Nbt3fykzJ468h; Fri, 6 Feb 2026 00:54:18 +0800 (CST) Received: from dubpeml500005.china.huawei.com (unknown [7.214.145.207]) by mail.maildlp.com (Postfix) with ESMTPS id 6EC8B40569; Fri, 6 Feb 2026 00:55:09 +0800 (CST) Received: from localhost (10.48.151.164) by dubpeml500005.china.huawei.com (7.214.145.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 5 Feb 2026 16:55:07 +0000 Date: Thu, 5 Feb 2026 16:55:05 +0000 From: Jonathan Cameron To: Ben Horgan CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 27/41] arm_mpam: resctrl: Add support for csu counters Message-ID: <20260205165505.000075a2@huawei.com> In-Reply-To: <20260203214342.584712-28-ben.horgan@arm.com> References: <20260203214342.584712-1-ben.horgan@arm.com> <20260203214342.584712-28-ben.horgan@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.151.164] X-ClientProxiedBy: lhrpeml100012.china.huawei.com (7.191.174.184) To dubpeml500005.china.huawei.com (7.214.145.207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260205_085513_742096_267699E4 X-CRM114-Status: GOOD ( 18.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 3 Feb 2026 21:43:28 +0000 Ben Horgan wrote: > From: James Morse > > resctrl exposes a counter via a file named llc_occupancy. This isn't really > a counter as its value goes up and down, this is a snapshot of the cache > storage usage monitor. > > Add some picking code which will only find an L3. The resctrl counter > file is called llc_occupancy but we don't check it is the last one as > it is already identified as L3. > > Signed-off-by: James Morse > Co-developed-by: Dave Martin > Signed-off-by: Dave Martin > Signed-off-by: Ben Horgan > --- > Changes since rfc: > Allow csu counters however many partid or pmg there are > else if -> if > reduce scope of local variables > drop has_csu > > Changes since v2: > return -> break so works for mbwu in later patch > add for_each_mpam_resctrl_mon > return error from mpam_resctrl_monitor_init(). It may fail when is abmc > allocation introduced in a later patch. > Squashed in patch from Dave Martin: > https://lore.kernel.org/lkml/20250820131621.54983-1-Dave.Martin@arm.com/ > > Changes since v3: > resctrl_enable_mon_event() signature update > Restrict the events considered > num-rmid update > Use raw_smp_processor_id() > Tighten heuristics: > Make sure it is the L3 > Please shout if this means the counters aren't exposed on any platforms I'm guessing that you mean on platforms where they were under previous version of the heuristic? I'll leave zhengheng to comment on that for our platforms. > Drop tags due to change in policy/rework > > Signed-off-by: Ben Horgan Doesn't really matter as it's the bit after --- , but what's a SoB doing here? Reviewed-by: Jonathan Cameron