lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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;
>

\
 
 \ /
  Last update: 2017-03-31 20:46    [W:0.096 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site