From nobody Sat Jun 13 08:47:03 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 37F50344DB5; Fri, 8 May 2026 10:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778237799; cv=none; b=VBgzBI0oiRA0rPhFrV8oY/eipUCBby7Movrro3aeys6qQlyrHow0IX8O9WJC1CJ3UVYMhU1t/Z/LsYAk5u0tOhpV2DMm3Ldml3/FvmVDUwwAwvIKcOhUu7A7/EKOdSE+qLOZ8VR4QnhMyuyC5RTwAUJjQyH03LxT6TZmt0JiHDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778237799; c=relaxed/simple; bh=9dRuc545yqcfF9SXMAB0GY/zrhTrph1tA/Jv8ywURBA=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=YVbqjvMIEWOIOuDaShZX7BjU1/D1tcxJ86goxJomyOqzo8bPh2xEqZmT9usn47dBxBUzPviaxdYpZ//vhnJC5w00iPoKu+5+iZ5O+OvHsyhK9BazVcVty22lMJolpJdWXoLzsadrjCRhZYykFbrx/WcHD+BJSKnju8fwcBKEeTE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=uRCdrC+o; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ueF64rqQ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uRCdrC+o"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ueF64rqQ" Date: Fri, 08 May 2026 10:56:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778237795; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m/wEdMLIsx0Lcz0sY3XR76YkTY7WnOHkriL8vv21hhU=; b=uRCdrC+ooqq9SSMXXJTf+FSx31Zu2bH5Eff+/aPhlVKkkCw+VrwbbMvnPHqw26LVgGVpAz t8h6sMU1dd74vi+HBHqjtVv20oBkBSWXzve9pQJrKcChn08112E3iO/B5Zuqt1pJ1EdRDO ViCMX4ACfdhccD3W3AAZmyNF/2PfsLpH426x3CLls/i9ZzGDb/H65JhCRY2lvQi+bUKh8N Q7Iznn5Dm+7YQKi/wN351R8NdCaoqYUG7uAN1YbGXFVEvWAAjNzFHyF3tAT42z22KC28mp goiGkJpDoOYyYnX6fBWuQ7ILY1FtSWMesYBKVINiSan5AKHsM3W0yWxwW3ZETg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778237795; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m/wEdMLIsx0Lcz0sY3XR76YkTY7WnOHkriL8vv21hhU=; b=ueF64rqQmM3SqwuO65Z+1n1SS0rRCzc2Z/Arx2AchNLAwUy+KWiYthykwiiZClHTdhqjzK Udd/+h2Ktr7vMACw== From: "tip-bot2 for Ben Horgan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] fs/resctrl: Continue counter allocation after failure Cc: Ben Horgan , "Borislav Petkov (AMD)" , Babu Moger , Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177823779414.864.12951690999628898178.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cache branch of tip: Commit-ID: 3aec86e4ea013c084a232c83754d182c9aaf378e Gitweb: https://git.kernel.org/tip/3aec86e4ea013c084a232c83754d182c9= aaf378e Author: Ben Horgan AuthorDate: Wed, 06 May 2026 09:28:53 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 08 May 2026 12:07:43 +02:00 fs/resctrl: Continue counter allocation after failure In mbm_event mode, with mbm_assign_on_mkdir set to 1, when a user creates a new CTRL_MON or MON group resctrl attempts to allocate counters for each of the supported MBM events on each resctrl domain. As counters are limited, such allocation may fail and when it does counter allocations for the remaining domains are skipped even if the domains have available counters. Because of that, the user needs to view the resource group'smbm_L3_assignme= nts file to get an accurate view of counter assignment in a new resource group = and then manually create counters in the skipped domains with available counter= s. Writes to mbm_L3_assignments using the wildcard format, :*=3De, also= skip counter allocation in other domains after a counter allocation failure. When handling a request to create counters in all domains it is unnecessary for a counter allocation in one domain to prevent counter allocation in other domains. Always attempt to allocate all the counters requested. [ bp: Massage commit message. ] Signed-off-by: Ben Horgan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Babu Moger Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/20260506082855.3694761-1-ben.horgan@arm.com --- fs/resctrl/monitor.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 5fbcc64..0e6a389 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -1211,9 +1211,10 @@ static int rdtgroup_alloc_assign_cntr(struct rdt_res= ource *r, struct rdt_l3_mon_ * NULL; otherwise, assign the counter to the specified domain @d. * * If all counters in a domain are already in use, rdtgroup_alloc_assign_c= ntr() - * will fail. The assignment process will abort at the first failure encou= ntered - * during domain traversal, which may result in the event being only parti= ally - * assigned. + * will fail. When attempting to assign counters to all domains, carry on = trying + * to assign counters after a failure since only some domains may have cou= nters + * and the goal is to assign counters where possible. If any counter assig= nment + * fails, return the error from the last failing assignment. * * Return: * 0 on success, < 0 on failure. @@ -1226,9 +1227,11 @@ static int rdtgroup_assign_cntr_event(struct rdt_l3_= mon_domain *d, struct rdtgro =20 if (!d) { list_for_each_entry(d, &r->mon_domains, hdr.list) { - ret =3D rdtgroup_alloc_assign_cntr(r, d, rdtgrp, mevt); - if (ret) - return ret; + int err; + + err =3D rdtgroup_alloc_assign_cntr(r, d, rdtgrp, mevt); + if (err) + ret =3D err; } } else { ret =3D rdtgroup_alloc_assign_cntr(r, d, rdtgrp, mevt);