From nobody Sun Jun 14 08:21:20 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 B69BF3CE49D; Wed, 1 Apr 2026 22:35:32 +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=1775082939; cv=none; b=hHj6ZeNN9d3l5dm1DhXUq8BBk1pDHiR5qgYTCjR+ghtgku3bHdVG2WcFeixrI7zEO9vzKiID0fX93uS047i2N6BEtnL3RGGikdQPJe432AM122XKpbgIvBwHs35Wm5fgWDueRlqMa9hg6xdWYMH2tEwoI/aSWgv/38QWHz6d9ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775082939; c=relaxed/simple; bh=lAOb0IFcb+ABSS5LQHZ5bnBT08Ems3WG4TqHXw4cNUA=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KSLMoZ26dgDg1xYsgJ3r4V3CWMN8WdN4jm0yxKAOYZKs/Xba6KQoCpLB2Zypc74bj91PQ/U3fyIIHP7w09z0lLkzxme1P6I7PTo1/o3WXVP1Gevt+wYvTLSGs0BbqoFQ+GnsdpaeSasUzwG61efEgrhjFeoazO/fg+mjHUF8Ua4= 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=GwDiZgJ9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Gno/UDJj; 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="GwDiZgJ9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Gno/UDJj" Date: Wed, 01 Apr 2026 22:35:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775082930; 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: in-reply-to:in-reply-to:references:references; bh=W/VztP+gM84BoGkuqGe/2VAeLO5/v8Wdo/2lwZYSeYk=; b=GwDiZgJ903GXwj8QIyDhPzpi7JP6uiYwDtRCFgsexa1UVddCPC8PkSnDJH5Ix/plVQyH76 2JyOOBflilvd+6wAXY+KfJZvXphfL2/vedQf0wAJ7ZSB/RaWYvMEUlKDJIUgv+GRPpkcq4 5plpUBQs986PWmFYVJm7y11oRAnfdU/T+s+HdFTxxjiRNJficjaTI9ym2F7UyT8sEJ/89Q pNksJrDiAaSbG0u2sx0dFo2Sc8DNNLl1WoRwufgm9BcoEfdOHl+3dPDpfTVy9HA1fs+yK7 nQDyJUxYADedtLwkA5bU7E/vA7gNL/oNiAbsGRUJW+HSAwBahNdYhHkhJz5PpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775082930; 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: in-reply-to:in-reply-to:references:references; bh=W/VztP+gM84BoGkuqGe/2VAeLO5/v8Wdo/2lwZYSeYk=; b=Gno/UDJjDC50WXH5MC9NZ/qOYzTXNDVf9v/by1fKK/hNiJy8axmxpKGCFDL1oWQL8zef1e 3Ge6lbccgoD6i3AA== From: "tip-bot2 for Aaron Tomlin" 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: Add "*" shorthand to set io_alloc CBM for all domains Cc: Aaron Tomlin , "Borislav Petkov (AMD)" , Reinette Chatre , Babu Moger , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260325001159.447075-3-atomlin@atomlin.com> References: <20260325001159.447075-3-atomlin@atomlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177508292845.1647592.11117936995838611798.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: d2bf45d067c728b0fe6e8f99a7386b8291e391e3 Gitweb: https://git.kernel.org/tip/d2bf45d067c728b0fe6e8f99a7386b829= 1e391e3 Author: Aaron Tomlin AuthorDate: Tue, 24 Mar 2026 20:11:59 -04:00 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 02 Apr 2026 00:22:59 +02:00 fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains Configuring the io_alloc_cbm interface requires an explicit domain ID for e= ach cache domain. On systems with high core counts and numerous cache clusters, this requirement becomes cumbersome for automation and management tasks that aim to apply a uniform policy. Introduce a wildcard domain ID selector "*" for the io_alloc_cbm interface. This enables users to set the same Capacity Bitmask (CBM) across all cache domains in a single operation. Signed-off-by: Aaron Tomlin Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger Tested-by: Babu Moger Link: https://patch.msgid.link/20260325001159.447075-3-atomlin@atomlin.com --- Documentation/filesystems/resctrl.rst | 8 ++++++++ fs/resctrl/ctrlmondata.c | 21 +++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesyst= ems/resctrl.rst index ba609f8..b003bed 100644 --- a/Documentation/filesystems/resctrl.rst +++ b/Documentation/filesystems/resctrl.rst @@ -215,6 +215,14 @@ related to allocation: # cat /sys/fs/resctrl/info/L3/io_alloc_cbm 0=3D00ff;1=3D000f =20 + An ID of "*" configures all domains with the provided CBM. + + Example on a system that does not require a minimum number of consecutiv= e bits in the mask:: + + # echo "*=3D0" > /sys/fs/resctrl/info/L3/io_alloc_cbm + # cat /sys/fs/resctrl/info/L3/io_alloc_cbm + 0=3D0;1=3D0 + When CDP is enabled "io_alloc_cbm" associated with the CDP_DATA and CDP_= CODE resources may reflect the same values. For example, values read from and written to /sys/fs/resctrl/info/L3DATA/io_alloc_cbm may be reflected by diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c index 2ef5316..9a7dfc4 100644 --- a/fs/resctrl/ctrlmondata.c +++ b/fs/resctrl/ctrlmondata.c @@ -954,25 +954,34 @@ static int resctrl_io_alloc_parse_line(char *line, s= truct rdt_resource *r, struct resctrl_schema *s, u32 closid) { enum resctrl_conf_type peer_type; + unsigned long dom_id =3D ULONG_MAX; struct rdt_parse_data data; struct rdt_ctrl_domain *d; + bool update_all =3D false; char *dom =3D NULL, *id; - unsigned long dom_id; =20 next: if (!line || line[0] =3D=3D '\0') return 0; =20 + if (update_all) { + rdt_last_cmd_puts("Configurations after global '*'\n"); + return -EINVAL; + } + dom =3D strsep(&line, ";"); id =3D strsep(&dom, "=3D"); - if (!dom || kstrtoul(id, 10, &dom_id)) { + + if (dom && !strcmp(id, "*")) { + update_all =3D true; + } else if (!dom || kstrtoul(id, 10, &dom_id)) { rdt_last_cmd_puts("Missing '=3D' or non-numeric domain\n"); return -EINVAL; } =20 dom =3D strim(dom); list_for_each_entry(d, &r->ctrl_domains, hdr.list) { - if (d->hdr.id =3D=3D dom_id) { + if (update_all || d->hdr.id =3D=3D dom_id) { data.buf =3D dom; data.mode =3D RDT_MODE_SHAREABLE; data.closid =3D closid; @@ -988,10 +997,14 @@ next: &d->staged_config[s->conf_type], sizeof(d->staged_config[0])); } - goto next; + if (!update_all) + goto next; } } =20 + if (update_all) + goto next; + rdt_last_cmd_printf("Invalid domain %lu\n", dom_id); return -EINVAL; }