Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-13 Thread Shivappa Vikas
On Sun, 2 Jul 2017, Thomas Gleixner wrote: { + struct rdtgroup *pr = rdtgrp->parent, *cr; *pr and *cr really suck. We used r before rdtgroup. pr would be parent rdtgrp. Wanted to keep them short as there are more in this function. prgrp can be used if thats not ok?

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-13 Thread Shivappa Vikas
On Thu, 6 Jul 2017, Thomas Gleixner wrote: On Thu, 6 Jul 2017, Shivappa Vikas wrote: On Sun, 2 Jul 2017, Thomas Gleixner wrote: + /* Check whether cpus belong to parent ctrl group */ + cpumask_andnot(tmpmask, newmask, &pr->cpu_mask); + if (cpumask_weight(tmpmask)) { +

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-06 Thread Thomas Gleixner
On Thu, 6 Jul 2017, Shivappa Vikas wrote: > On Sun, 2 Jul 2017, Thomas Gleixner wrote: > > > + /* Check whether cpus belong to parent ctrl group */ > > > + cpumask_andnot(tmpmask, newmask, &pr->cpu_mask); > > > + if (cpumask_weight(tmpmask)) { > > > + ret = -EINVAL; > > > + goto out

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-06 Thread Shivappa Vikas
On Sun, 2 Jul 2017, Thomas Gleixner wrote: On Mon, 26 Jun 2017, Vikas Shivappa wrote: -static ssize_t rdtgroup_cpus_write(struct kernfs_open_file *of, - char *buf, size_t nbytes, loff_t off) +static ssize_t cpus_mon_write(struct kernfs_open_file *of, +

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-06 Thread Shivappa Vikas
On Sun, 2 Jul 2017, Thomas Gleixner wrote: On Mon, 26 Jun 2017, Vikas Shivappa wrote: diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h index fdf3654..fec8ba9 100644 --- a/arch/x86/kernel/cpu/intel_rdt.h +++ b/arch/x86/kernel/cpu/intel_rdt.h @@ -37,6 +37,8 @@ stru

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-02 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Vikas Shivappa wrote: > -static ssize_t rdtgroup_cpus_write(struct kernfs_open_file *of, > -char *buf, size_t nbytes, loff_t off) > +static ssize_t cpus_mon_write(struct kernfs_open_file *of, > + char *buf, size_t nbytes

Re: [PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-07-02 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Vikas Shivappa wrote: > diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h > index fdf3654..fec8ba9 100644 > --- a/arch/x86/kernel/cpu/intel_rdt.h > +++ b/arch/x86/kernel/cpu/intel_rdt.h > @@ -37,6 +37,8 @@ struct mon_evt { > extern bool rdt_alloc_e

[PATCH 13/21] x86/intel_rdt/cqm: Add cpus file support

2017-06-26 Thread Vikas Shivappa
The cpus file is extended to support resource monitoring. This is used to over-ride the RMID of the default group when running on specific CPUs. It works similar to the resource control. The "cpus" and "cpus_list" file is present in default group, ctrl_mon groups and monitor groups. Each "cpus" fi