RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Yu, Fenghua
> From: David Carrillo-Cisneros [mailto:davi...@google.com] > > +static int get_res_type(char **res, enum resource_type *res_type) { > > + char *tok; > > + > > + tok = strsep(res, ":"); > > + if (tok == NULL) > > + return -EINVAL; > > + > > + if (!strcmp(tok,

RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Yu, Fenghua
> From: David Carrillo-Cisneros [mailto:davi...@google.com] > > +static int get_res_type(char **res, enum resource_type *res_type) { > > + char *tok; > > + > > + tok = strsep(res, ":"); > > + if (tok == NULL) > > + return -EINVAL; > > + > > + if (!strcmp(tok,

RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Yu, Fenghua
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Wednesday, July 13, 2016 11:11 PM > On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote: > > > +static void free_cache_resource(struct cache_resource *l) { > > > + kfree(l->cbm); > > > + kfree(l->cbm2); > > > +

RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Yu, Fenghua
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Wednesday, July 13, 2016 11:11 PM > On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote: > > > +static void free_cache_resource(struct cache_resource *l) { > > > + kfree(l->cbm); > > > + kfree(l->cbm2); > > > +

Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Thomas Gleixner
On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote: > > +static void free_cache_resource(struct cache_resource *l) > > +{ > > + kfree(l->cbm); > > + kfree(l->cbm2); > > + kfree(l->closid); > > + kfree(l->refcnt); > > this function is used to clean up alloc_cache_resource

Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-14 Thread Thomas Gleixner
On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote: > > +static void free_cache_resource(struct cache_resource *l) > > +{ > > + kfree(l->cbm); > > + kfree(l->cbm2); > > + kfree(l->closid); > > + kfree(l->refcnt); > > this function is used to clean up alloc_cache_resource

Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-13 Thread David Carrillo-Cisneros
> +static int get_res_type(char **res, enum resource_type *res_type) > +{ > + char *tok; > + > + tok = strsep(res, ":"); > + if (tok == NULL) > + return -EINVAL; > + > + if (!strcmp(tok, "L3")) { Maybe use strstrip to allow a more readable input ? i.e. "L3 :

Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-13 Thread David Carrillo-Cisneros
> +static int get_res_type(char **res, enum resource_type *res_type) > +{ > + char *tok; > + > + tok = strsep(res, ":"); > + if (tok == NULL) > + return -EINVAL; > + > + if (!strcmp(tok, "L3")) { Maybe use strstrip to allow a more readable input ? i.e. "L3 :

[PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-12 Thread Fenghua Yu
From: Fenghua Yu There is one "schemas" file in each rdtgroup directory. User can input schemas in the file to control how to allocate resources. The input schemas first needs to pass validation. If there is no syntax issue, kernel digests the input schemas and find CLOSID

[PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

2016-07-12 Thread Fenghua Yu
From: Fenghua Yu There is one "schemas" file in each rdtgroup directory. User can input schemas in the file to control how to allocate resources. The input schemas first needs to pass validation. If there is no syntax issue, kernel digests the input schemas and find CLOSID for each domain for