Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3115445rdg; Tue, 17 Oct 2023 05:18:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3v/RRsSuG3fzW8Z8OzsH5oeIlYXPqXhsaMBvkTIB0RPxfWRi+vgBNdS9HBQ750SAggDVe X-Received: by 2002:a05:6a20:2584:b0:149:122b:6330 with SMTP id k4-20020a056a20258400b00149122b6330mr2148446pzd.10.1697545106207; Tue, 17 Oct 2023 05:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697545106; cv=none; d=google.com; s=arc-20160816; b=Rc6UiLsq97ANFqTiKOZXiaMx3y7DF4WtndzVwnzcqDJb1U3soyiWuT4+oWivPptMEO 8PLcKfKOdVp1g8qGQ4Jspo6nNr5LCvSdRHa3KV/uFwoFrmCihrw0GxbjbUJczsPE7A+Q ihif8ZE4nj0oSz+uAgqR/M8FRjooMcSS6CZARjqs+WzbXVjjMc/1612ANxQWVF1FV7XI VYFyvuoSL5Q5agub3drJTP/dORUalc5VWTUN/eI+inJLFiCCTQSd6vtvRIp/wbMm50l0 dfyNuFZxm7UKCglgPF09jzlHdw5gU/LiQS+3ofDtwknhLiLgCjKSIgNqL4DZw2IG64iQ g30A== 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=kmcQE5lRmLwcJo5cQwSR++3r6UQhsrhv/OAurZwBPg0=; fh=Vxe4qMNrZwzYwfxT5snNGqGe8TJ97uio17uk8FFobXk=; b=BEVgjtXjb4Whj27Zvk7BOuErSlU1Qc0FwbIJLLViTpPcmbVO+ISbp2gfjaGL1yqIPr ZwaZq3RvTbgKDZ95VADEQ2qbsU+Hd1ScK6w9pu11/ua4KXdLPhpscLxbS+QwzWgMPlHD nDIPbWakQ5LIzEQrxSNWKP++7kknR9lWT5Lq4zm0C2GoIqokcFTzW/IVv2FrQkwYuqfK etaEkEzYFWBGGbayl8wki6IhxXUO7ORbjSuXbU6isMX2yxseMjHZxGTML2ubl7zjKuZ4 VBHdfFvm0VNFL5RWHIp830O5RQQYa6LbPnFdykb0oM2Hx3hV1smClpZ8vvN3Q5ehZh0z rzow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sXkO+DS7; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q11-20020a170902dacb00b001c3f96ec6d6si1798546plx.111.2023.10.17.05.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sXkO+DS7; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DDF788039864; Tue, 17 Oct 2023 05:18:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232849AbjJQMSD (ORCPT + 99 others); Tue, 17 Oct 2023 08:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232577AbjJQMSC (ORCPT ); Tue, 17 Oct 2023 08:18:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 789C0195; Tue, 17 Oct 2023 05:18:00 -0700 (PDT) Date: Tue, 17 Oct 2023 12:17:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697545079; 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=kmcQE5lRmLwcJo5cQwSR++3r6UQhsrhv/OAurZwBPg0=; b=sXkO+DS7ApDqGac3QgVoQWgzhfMsbE/c+Z1hFv4XDBHaF1XQrXjBDx00ouCpgRCoUQytf3 dOtfF3qbW7fM6JcVB5ysamsObIdD7FLOhXLNaSaWyaPxa17dZ4F5vaSEBfvcmLcrHLYenT gZ9uJukmZNkaNmou4i8ZicfsFZYWuH1ySBHWE5JoGb9q3xi1FbD+Iefo2eRgqHXFFJMtj4 ZsviT/BD/rfgO9MTXPCyWwZ1ZqnNrAVzxjNNF6v3GEKGLC/G1YxnzMleCgZg6dptf5Ojrh w68aE0ZKwqvgjMSna47BHODpINIVqHhJpC2n5OPSs+7O5Lpnp+IEoV/D6L6AFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697545079; 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=kmcQE5lRmLwcJo5cQwSR++3r6UQhsrhv/OAurZwBPg0=; b=cYBm75hFY1fLrsgQzBO66saFQq1lO6QP/vgsFWqx7bHhQFRPdMoAigWCTjW2HUk+KtubPR HaX2j48GosKtfxAg== 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 support for the files of MON groups only Cc: Babu Moger , "Borislav Petkov (AMD)" , Peter Newman , Tan Shaopeng , Fenghua Yu , ilpo.jarvinen@linux.intel.com, Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231017002308.134480-9-babu.moger@amd.com> References: <20231017002308.134480-9-babu.moger@amd.com> MIME-Version: 1.0 Message-ID: <169754507834.3135.8385571109591338616.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 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:18:20 -0700 (PDT) The following commit has been merged into the x86/cache branch of tip: Commit-ID: 918f211b5e4e709e91acf856967a850569c96b71 Gitweb: https://git.kernel.org/tip/918f211b5e4e709e91acf856967a850569c= 96b71 Author: Babu Moger AuthorDate: Mon, 16 Oct 2023 19:23:07 -05:00 Committer: Borislav Petkov (AMD) CommitterDate: Tue, 17 Oct 2023 14:05:24 +02:00 x86/resctrl: Add support for the files of MON groups only Files unique to monitoring groups have the RFTYPE_MON flag. When a new monitoring group is created the resctrl files with flags RFTYPE_BASE (files common to all resource groups) and RFTYPE_MON (files unique to monitoring groups) are created to support interacting with the new monitoring group. A resource group can support both monitoring and control, also termed a CTRL_MON resource group. CTRL_MON groups should get both monitoring and control resctrl files but that is not the case. Only the RFTYPE_BASE and RFTYPE_CTRL files are created for CTRL_MON groups. Ensure that files with the RFTYPE_MON flag are created for CTRL_MON groups. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Peter Newman Reviewed-by: Tan Shaopeng Reviewed-by: Fenghua Yu Reviewed-by: Ilpo J=C3=A4rvinen Reviewed-by: Reinette Chatre Tested-by: Peter Newman Tested-by: Tan Shaopeng Link: https://lore.kernel.org/r/20231017002308.134480-9-babu.moger@amd.com --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/res= ctrl/rdtgroup.c index 5814a0b..5f6d6ba 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2551,6 +2551,7 @@ static void schemata_list_destroy(void) static int rdt_get_tree(struct fs_context *fc) { struct rdt_fs_context *ctx =3D rdt_fc2context(fc); + unsigned long flags =3D RFTYPE_CTRL_BASE; struct rdt_domain *dom; struct rdt_resource *r; int ret; @@ -2581,7 +2582,10 @@ static int rdt_get_tree(struct fs_context *fc) =20 closid_init(); =20 - ret =3D rdtgroup_add_files(rdtgroup_default.kn, RFTYPE_CTRL_BASE); + if (rdt_mon_capable) + flags |=3D RFTYPE_MON; + + ret =3D rdtgroup_add_files(rdtgroup_default.kn, flags); if (ret) goto out_schemata_free; =20 @@ -3271,8 +3275,8 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent= _kn, enum rdt_group_type rtype, struct rdtgroup **r) { struct rdtgroup *prdtgrp, *rdtgrp; + unsigned long files =3D 0; struct kernfs_node *kn; - uint files =3D 0; int ret; =20 prdtgrp =3D rdtgroup_kn_lock_live(parent_kn); @@ -3324,10 +3328,13 @@ static int mkdir_rdt_prepare(struct kernfs_node *pare= nt_kn, goto out_destroy; } =20 - if (rtype =3D=3D RDTCTRL_GROUP) + if (rtype =3D=3D RDTCTRL_GROUP) { files =3D RFTYPE_BASE | RFTYPE_CTRL; - else + if (rdt_mon_capable) + files |=3D RFTYPE_MON; + } else { files =3D RFTYPE_BASE | RFTYPE_MON; + } =20 ret =3D rdtgroup_add_files(kn, files); if (ret) {