From patchwork Tue Jan 24 09:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 47619 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2051624wrn; Tue, 24 Jan 2023 01:27:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXveQSH9pXwfzkLR+iha96hbyte9hpMuKfMTWVSUjw2kmeDiW/Wtt1WOGsd1Hzz8uufa5McD X-Received: by 2002:a17:90a:5d08:b0:229:936b:adfd with SMTP id s8-20020a17090a5d0800b00229936badfdmr28672368pji.41.1674552464360; Tue, 24 Jan 2023 01:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674552464; cv=none; d=google.com; s=arc-20160816; b=cpMi2VvIoDTNncBnHN8rFskyWDUjHHWn/5z9MOx5XKoRhzmEyqGlXwY3MywuIu1i0l tYvhIC/HAMEZYmUX+g+96XTnK6TW8esljJ9ee+B9iR5Ix51REdH09m0BDuzqBipVODzf eECBnv83w/bnf3I4gC+cRVv6wS7ZV6JynP4UqMPUUW+jvQCNtzv0RQg3ud5PY/pWQMHU 4IDnGnxJLWukwLnJZhjho/hN1zgJP3Fan6U8642S8dg0ujmJIRLvsxJQRIbBNXBnevtV KZNGvEjBanJGBEYnAxcmcE2O4HOAieor/uy9o4d0NYaVj6Z48ymDKu0ir7866gzgIGdq 0Z5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Hs6Gt3G7vzGof1pAkzTdwmtY96iWMmkidqX3PCTzQW8=; b=MGH7FXCFHo5uTZb7kndbei2QqkUAHtCK3aSBNBRY8QADTuRbGycEMqbUNoEHRsu5S+ i+8k13TKQW30TFXOShGHM5JPaNOUiyUo4PZozU7f+D8vW82645QnZhMmZ/AeMzhkJ5kY CthAJZdKeTXJqmv6T3f/KoGESeAlFSS+E4ck4eU3fZiJ1Fbx65519qNfSm3vjRBoowr1 BlmyTRH/PSXlooF5us5XQ0HD58APuXEO0PWORQVvdFkRIFfbWlEoCI/Hd73vLkU8K2K1 S5DH/ziawwRxRaHIFFFhAqF/g3YAMby9Ygc7jJS3A9GaZzGQBSmgmnlJqoboeXlNtgxz QrBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eRawV1C+; dkim=neutral (no key) header.i=@linutronix.de header.b=Vthr4zdS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a17090ab38800b00205d58e9125si2055786pjr.68.2023.01.24.01.27.32; Tue, 24 Jan 2023 01:27:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eRawV1C+; dkim=neutral (no key) header.i=@linutronix.de header.b=Vthr4zdS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233522AbjAXJ1I (ORCPT + 99 others); Tue, 24 Jan 2023 04:27:08 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754921911071939265?= X-GMAIL-MSGID: =?utf-8?q?1755895524384045949?= The following commit has been merged into the x86/cache branch of tip: Commit-ID: a5b699665580725de8c0c01f2163a15af78b6866 Gitweb: https://git.kernel.org/tip/a5b699665580725de8c0c01f2163a15af78b6866 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/resctrl/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[] = { .fflags = RFTYPE_RES_MB, }, }, + [RDT_RESOURCE_SMBA] = + { + .r_resctrl = { + .rid = RDT_RESOURCE_SMBA, + .name = "SMBA", + .cache_level = 3, + .domains = domain_init(RDT_RESOURCE_SMBA), + .parse_ctrlval = parse_bw, + .format_str = "%d=%*u", + .fflags = RFTYPE_RES_MB, + }, + }, }; /* diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/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, /* Must be the last */ RDT_NUM_RESOURCES,