[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230815152712.1760046-5-amitsinght@marvell.com>
Date: Tue, 15 Aug 2023 20:57:04 +0530
From: Amit Singh Tomar <amitsinght@...vell.com>
To: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
CC: <fenghua.yu@...el.com>, <reinette.chatre@...el.com>,
<james.morse@....com>, <gcherian@...vell.com>, <robh@...nel.org>,
<peternewman@...gle.com>, Amit Singh Tomar <amitsinght@...vell.com>
Subject: [RFC 04/12] fs/resctrl: Obtain CPBM upon priority partition presence
Resource control group's "schemata" file represents the cache portion
bit map (XXXX), parsed from buffer with "L3:0=XXXX" format. Now, with
the introduction of priority control, "schemata" file format has changed
to "L3:0=XXXX,X", where cpbm (XXXX) is split from priority mask(X) using
using delimiter ",".
With this change, CPBM is properly fetched from schemata file when priority
partition support is present.
Signed-off-by: Amit Singh Tomar <amitsinght@...vell.com>
---
fs/resctrl/ctrlmondata.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
index 27d8bc25a4cb..b19ac2509e38 100644
--- a/fs/resctrl/ctrlmondata.c
+++ b/fs/resctrl/ctrlmondata.c
@@ -108,6 +108,9 @@ static bool cbm_validate(char *buf, u32 *data, struct rdt_resource *r)
unsigned int cbm_len = r->cache.cbm_len;
int ret;
+ if (r->priority_cap)
+ buf = strsep(&buf, ",");
+
ret = kstrtoul(buf, 16, &val);
if (ret) {
rdt_last_cmd_printf("Non-hex character in the mask %s\n", buf);
--
2.25.1
Powered by blists - more mailing lists