[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1703311130590.25705@vshiva-Udesk>
Date: Fri, 31 Mar 2017 11:45:52 -0700 (PDT)
From: Shivappa Vikas <vikas.shivappa@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>
cc: Thomas Gleixner <tglx@...utronix.de>,
Vikas Shivappa <vikas.shivappa@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/intel_rdt: Implement "update" mode when writing
schemata file
On Fri, 24 Mar 2017, Luck, Tony wrote:
> +++ b/arch/x86/kernel/cpu/intel_rdt_schemata.c
> @@ -56,7 +56,7 @@ static bool cbm_validate(unsigned long var, struct rdt_resource *r)
> * Read one cache bit mask (hex). Check that it is valid for the current
> * resource type.
> */
> -static int parse_cbm(char *buf, struct rdt_resource *r)
> +static int parse_cbm(char *buf, struct rdt_resource *r, struct rdt_domain *d)
> {
> unsigned long data;
> int ret;
> @@ -66,7 +66,8 @@ static int parse_cbm(char *buf, struct rdt_resource *r)
> return ret;
Would need a check here for repeated domain entries to error out something like:
echo -e "L3:1=7f;1=7;1=7ff" | cat > /sys/fs/resctrl/p1/schemata
if (d->have_newcbm)
return -EINVAL;
> if (!cbm_validate(data, r))
> return -EINVAL;
> - r->tmp_cbms[r->num_tmp_cbms++] = data;
> + d->new_cbm = data;
> + d->have_new_cbm = true;
>
Powered by blists - more mailing lists