From patchwork Wed Jan 17 14:14:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Singh Tomar X-Patchwork-Id: 13521789 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 209A9C47258 for ; Wed, 17 Jan 2024 14:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4ZoHf8fFDtb4INKuYa7V+LTz5FurznnoBTrue2oegRU=; b=u6DyxujB4h2wMH /Bt/se2XmMOUkt8gIMXfL/1ybvcZf2QFklg6/M5rMQrwp0leRjlmGUgdYrmCWbZ1GK1lElgdHMWAJ ozdoTT6gPdzQLXK93vBSXosmDymMdZjADFfPYyI2FHr+mtb6ox6Juzm1O0D1zPc2kRDn6osaqxVtb pjCkTa4OUqQSpSbgfMW5Vv4DwIniPJY+FuEyDLay1Zb4hQZixwH+3WAeFZfdno2RZTfGZHAX4HlcX h+SvByzo0m1xry5ngwZg3HquGh3NgGm0SFAe8k9otFlblFY2MC/ZBpafZ2lp8i307fisMH5i4JAB3 T502SfdCDaqt6hFZ5H7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6i4-00Gyzn-07; Wed, 17 Jan 2024 14:16:04 +0000 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174] helo=mx0b-0016f401.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6hN-00GyI6-1D for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 14:15:26 +0000 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40H7jROr028480; Wed, 17 Jan 2024 06:15:07 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=/xN3AdF7Ae4eT32Wd+i6HZ8ojNOSTLKCSBZfFn/Vwhk=; b=QnZ PcMGEQGEOruHyipobT//aEmS6RsveLW385X87nb9Zyg0VpGIayETnKDrfBsK635A /WbQHy4+dymBS8AOUJmFMKFt6LVOeAzlMftiUyXABzwEp82tkdo/BcX4q/O8waxI YfuD2J0DhM1TXH7G1PudFQ6gNjPxJKagHceFoa5qhy9fZpJsG4dq3yNYxlZugVaL DO2MZ20lxt9ztBTyWNUfahBqaUjKBirL4y1hqKLNBleTUXAtdNnlr6jDAQYqnZzu Q4TjrC8U4dsqutLiLUNUNHDMnmYJFKpZeeXAThGJNGMfRX91iVXh7q/gJY0ciFDC MVaMOlIIJQsGjmdTKwg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vpask953w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 06:15:07 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 17 Jan 2024 06:15:06 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 17 Jan 2024 06:15:06 -0800 Received: from localhost.localdomain (unknown [10.28.36.167]) by maili.marvell.com (Postfix) with ESMTP id 8BE755B6963; Wed, 17 Jan 2024 06:15:02 -0800 (PST) From: Amit Singh Tomar To: , CC: , , , , , , , , Amit Singh Tomar Subject: [PATCH v1 14/14] arm64/mpam: resctrl: export DSPRI value to info directory Date: Wed, 17 Jan 2024 19:44:05 +0530 Message-ID: <20240117141405.3063506-15-amitsinght@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240117141405.3063506-1-amitsinght@marvell.com> References: <20240117141405.3063506-1-amitsinght@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ZnrcZP3-NuROoWY2QqQdv4tcfeVQxXYM X-Proofpoint-GUID: ZnrcZP3-NuROoWY2QqQdv4tcfeVQxXYM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_08,2024-01-17_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_061522_180424_385ADB85 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that, we have support for priority partitioning, let's export Downstream priority value (maximum value that user can supply) to info directory. This value is visible under resource directory to which this control (Downstream priority partition ) is applied. Signed-off-by: Amit Singh Tomar --- Changes since RFC: * No change, it's new patch. --- fs/resctrl/rdtgroup.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index d71fac0ae4d4..8c3df4bb8ee9 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -1118,6 +1118,16 @@ static int rdt_bit_usage_show(struct kernfs_open_file *of, return 0; } +static int rdt_max_dspri_show(struct kernfs_open_file *of, + struct seq_file *seq, void *v) +{ + struct resctrl_schema *s = of->kn->parent->priv; + struct rdt_resource *r = s->res; + + seq_printf(seq, "%u\n", r->default_dspri_ctrl); + return 0; +} + static int rdt_min_bw_show(struct kernfs_open_file *of, struct seq_file *seq, void *v) { @@ -1713,6 +1723,13 @@ static struct rftype res_common_files[] = { .seq_show = rdt_bit_usage_show, .fflags = RF_CTRL_INFO | RFTYPE_RES_CACHE, }, + { + .name = "max_dspri", + .mode = 0444, + .kf_ops = &rdtgroup_kf_single_ops, + .seq_show = rdt_max_dspri_show, + .fflags = RF_CTRL_INFO | RFTYPE_RES_CACHE, + }, { .name = "min_bandwidth", .mode = 0444, @@ -2009,6 +2026,9 @@ static int rdtgroup_create_info_dir(struct kernfs_node *parent_kn) /* loop over enabled controls, these are all alloc_capable */ list_for_each_entry(s, &resctrl_schema_all, list) { + if (s->ctrl_type == SCHEMA_DSPRI) + continue; + r = s->res; fflags = r->fflags | RF_CTRL_INFO; ret = rdtgroup_mkdir_info_resdir(s, s->name, fflags);