From nobody Sun Sep 14 09:17:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 537A2C25B4E for ; Tue, 24 Jan 2023 09:27:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233574AbjAXJ1J (ORCPT ); Tue, 24 Jan 2023 04:27:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233438AbjAXJ0n (ORCPT ); Tue, 24 Jan 2023 04:26:43 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90AC13BDA6; Tue, 24 Jan 2023 01:26:42 -0800 (PST) Date: Tue, 24 Jan 2023 09:26:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1674552398; 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=Hs6Gt3G7vzGof1pAkzTdwmtY96iWMmkidqX3PCTzQW8=; b=eRawV1C+eMkN9NZ0abGsG3Ucugkj57N0p+7vof+Hjl+cFl6d+YXx1eaDXAVRmhAH6zIINn bbn7l6yELR8/Yyf6KLEsMXXhZxetBJ7DyKhVB/2HUz6RE08cTENInthbtgt7jCw7wQCTMz tZCOSLTnjmUM6mZwiR6Pk8JyGGpgs+lKOxnw8wTgCnthWTY6COLZIu9zYkpz2EfSdeBSk9 mOWDy6ca9FPrdt9XO77eJFgaueB9GU7LBnWafo/XHve/AR4p205RtjQ29PHpIUKHSu9pIr Yj18tOhm6wgY62sA95EjsV4m/B2VxiYgNVkdhjiTNWSQ+gQjsISt8R/K6kbMSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1674552398; 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=Hs6Gt3G7vzGof1pAkzTdwmtY96iWMmkidqX3PCTzQW8=; b=Vthr4zdStAOqifCNYvJ3eKcdGCvpCfcE5fX6IdMPpJIvfzNjisZ5OtLQav6WbxD87nIcM9 O//fum4hZ0HzBUAw== From: "tip-bot2 for Babu Moger" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA Cc: Babu Moger , "Borislav Petkov (AMD)" , Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230113152039.770054-4-babu.moger@amd.com> References: <20230113152039.770054-4-babu.moger@amd.com> MIME-Version: 1.0 Message-ID: <167455239810.4906.3081147401716810165.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cache branch of tip: Commit-ID: a5b699665580725de8c0c01f2163a15af78b6866 Gitweb: https://git.kernel.org/tip/a5b699665580725de8c0c01f2163a15af= 78b6866 Author: Babu Moger AuthorDate: Fri, 13 Jan 2023 09:20:29 -06:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 23 Jan 2023 17:38:22 +01:00 x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA Add a new resource type RDT_RESOURCE_SMBA to handle the QoS enforcement policies on the external slow memory. Mostly initialization of the essentials. Setting fflags to RFTYPE_RES_MB configures the SMBA resource to have the same resctrl files as the existing MBA resource. The SMBA resource has identical properties to the existing MBA resource. These properties will be enumerated in an upcoming change and exposed via resctrl because of this flag. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-4-babu.moger@amd.com --- arch/x86/kernel/cpu/resctrl/core.c | 12 ++++++++++++ arch/x86/kernel/cpu/resctrl/internal.h | 1 + 2 files changed, 13 insertions(+) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resct= rl/core.c index c98e52f..f6af3ac 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -100,6 +100,18 @@ struct rdt_hw_resource rdt_resources_all[] =3D { .fflags =3D RFTYPE_RES_MB, }, }, + [RDT_RESOURCE_SMBA] =3D + { + .r_resctrl =3D { + .rid =3D RDT_RESOURCE_SMBA, + .name =3D "SMBA", + .cache_level =3D 3, + .domains =3D domain_init(RDT_RESOURCE_SMBA), + .parse_ctrlval =3D parse_bw, + .format_str =3D "%d=3D%*u", + .fflags =3D RFTYPE_RES_MB, + }, + }, }; =20 /* diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/r= esctrl/internal.h index 5ebd28e..fdbbf66 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -409,6 +409,7 @@ enum resctrl_res_level { RDT_RESOURCE_L3, RDT_RESOURCE_L2, RDT_RESOURCE_MBA, + RDT_RESOURCE_SMBA, =20 /* Must be the last */ RDT_NUM_RESOURCES,