Re: [PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Marcelo Tosatti wrote: On Wed, Jul 01, 2015 at 03:21:04PM -0700, Vikas Shivappa wrote: Adds a description of Cache allocation technology, overview of kernel implementation and usage of Cache Allocation cgroup interface. Cache allocation is a sub-feature of Resource

Re: [PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Peter Zijlstra wrote: On Wed, Jul 01, 2015 at 03:21:07PM -0700, Vikas Shivappa wrote: +static inline bool cbm_is_contiguous(unsigned long var) +{ + unsigned long maxcbm = MAX_CBM_LENGTH; + unsigned long first_bit, zero_bit; + + if (!var

Re: [PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Peter Zijlstra wrote: On Wed, Jul 01, 2015 at 03:21:05PM -0700, Vikas Shivappa wrote: +static int __init intel_rdt_late_init(void) +{ + struct cpuinfo_x86 *c = _cpu_data; + + if (!cpu_has(c, X86_FEATURE_CAT_L3)) + return -ENODEV

Re: [PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Marcelo Tosatti wrote: On Wed, Jul 01, 2015 at 03:21:04PM -0700, Vikas Shivappa wrote: Adds a description of Cache allocation technology, overview of kernel implementation and usage of Cache Allocation cgroup interface. Cache allocation is a sub-feature of Resource

Re: [PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Peter Zijlstra wrote: On Wed, Jul 01, 2015 at 03:21:05PM -0700, Vikas Shivappa wrote: +static int __init intel_rdt_late_init(void) +{ + struct cpuinfo_x86 *c = boot_cpu_data; + + if (!cpu_has(c, X86_FEATURE_CAT_L3)) + return -ENODEV

Re: [PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-07-28 Thread Vikas Shivappa
On Tue, 28 Jul 2015, Peter Zijlstra wrote: On Wed, Jul 01, 2015 at 03:21:07PM -0700, Vikas Shivappa wrote: +static inline bool cbm_is_contiguous(unsigned long var) +{ + unsigned long maxcbm = MAX_CBM_LENGTH; + unsigned long first_bit, zero_bit; + + if (!var

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Fri, 24 Jul 2015, Vikas Shivappa wrote: On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
Hello PeterZ, On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation feature found in future Intel Xeon Intel processors. Cache Allocation is a sub

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation feature found in future Intel Xeon Intel processors. Cache Allocation is a sub-feature

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation feature found in future Intel Xeon Intel processors. Cache Allocation is a sub-feature

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
Hello PeterZ, On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation feature found in future Intel Xeon Intel processors. Cache Allocation is a sub

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-24 Thread Vikas Shivappa
On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Fri, 24 Jul 2015, Vikas Shivappa wrote: On Fri, 24 Jul 2015, Thomas Gleixner wrote: On Wed, 1 Jul 2015, Vikas Shivappa wrote: Cache allocation patches(dependent on prep patches) adds a cgroup subsystem to support the new Cache Allocation

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-13 Thread Vikas Shivappa
Hello Thomas, Just a ping for any feedback if any. Have tried to fix some issues you pointed out in V11 and V12. Thanks, Vikas On Wed, 1 Jul 2015, Vikas Shivappa wrote: This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves

Re: [PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-13 Thread Vikas Shivappa
Hello Thomas, Just a ping for any feedback if any. Have tried to fix some issues you pointed out in V11 and V12. Thanks, Vikas On Wed, 1 Jul 2015, Vikas Shivappa wrote: This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves

[PATCH 8/9] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-07-01 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 95 ++--- 1 file changed, 90 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu

[PATCH 7/9] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-07-01 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu/intel_rdt.c| 17

[PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-07-01 Thread Vikas Shivappa
cant CLOSids optimally. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205 ++

[PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-07-01 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa --- arch/x86/include

[PATCH 2/9] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-07-01 Thread Vikas Shivappa
search for the next online sibling during hot cpu exit, it uses the same mapping instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kern

[PATCH 9/9] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-07-01 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 1f9716c..790cdba 100644 --- a/arch/x86/kernel

[PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-07-01 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa --- Documentation/cgroups/rdt.txt | 215 ++ 1 file changed, 215 insertions(+) create

[PATCH 5/9] x86/intel_rdt: Add new cgroup and Class of service management

2015-07-01 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid<->CBM mapping. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel

[PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-01 Thread Vikas Shivappa
This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems. Cache allocation patches(dependent on prep patches) adds a cgroup

[PATCH 1/9] x86/intel_cqm: Modify hot cpu notification handling

2015-07-01 Thread Vikas Shivappa
online sibling during cpu exit, it uses the same map instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/perf_event_intel_cqm.

[PATCH 2/9] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-07-01 Thread Vikas Shivappa
for the next online sibling during hot cpu exit, it uses the same mapping instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch

[PATCH 9/9] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-07-01 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 1f9716c..790cdba

[PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-07-01 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- Documentation/cgroups/rdt.txt | 215 ++ 1 file

[PATCH 5/9] x86/intel_rdt: Add new cgroup and Class of service management

2015-07-01 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid-CBM mapping. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch

[PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-07-01 Thread Vikas Shivappa
. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205

[PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-07-01 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa vikas.shiva

[PATCH V12 0/9] Hot cpu handling changes to cqm, rapl and Intel Cache Allocation support

2015-07-01 Thread Vikas Shivappa
This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems. Cache allocation patches(dependent on prep patches) adds a cgroup

[PATCH 1/9] x86/intel_cqm: Modify hot cpu notification handling

2015-07-01 Thread Vikas Shivappa
sibling during cpu exit, it uses the same map instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu

[PATCH 8/9] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-07-01 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 95 ++--- 1 file changed, 90 insertions(+), 5 deletions

[PATCH 7/9] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-07-01 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu

[PATCH 2/9] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-06-25 Thread Vikas Shivappa
search for the next online sibling during hot cpu exit, it uses the same mapping instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kern

[PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-25 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa --- arch/x86/include

[PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-06-25 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa --- Documentation/cgroups/rdt.txt | 215 ++ 1 file changed, 215 insertions(+) create

[PATCH 5/9] x86/intel_rdt: Add new cgroup and Class of service management

2015-06-25 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid<->CBM mapping. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel

[PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-06-25 Thread Vikas Shivappa
cant CLOSids optimally. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205 ++

[PATCH 7/9] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-06-25 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu/intel_rdt.c| 17

[PATCH 8/9] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-25 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 89 - 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu

[PATCH 9/9] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-25 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 28886be..10e1a5b 100644 --- a/arch/x86/kernel

[PATCH 1/9] x86/intel_cqm: Modify hot cpu notification handling

2015-06-25 Thread Vikas Shivappa
online sibling during cpu exit, it uses the same map instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/perf_event_intel_cqm.

[PATCH V11 0/9] Hot cpu handling changes to cqm,rapl and Intel Cache Allocation support

2015-06-25 Thread Vikas Shivappa
This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems. Cache allocation patches(dependent on prep patches) adds a cgroup

[PATCH 7/9] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-06-25 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu

[PATCH 2/9] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-06-25 Thread Vikas Shivappa
for the next online sibling during hot cpu exit, it uses the same mapping instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch

[PATCH 4/9] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-25 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa vikas.shiva

[PATCH V11 0/9] Hot cpu handling changes to cqm,rapl and Intel Cache Allocation support

2015-06-25 Thread Vikas Shivappa
This patch has some changes to hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems. Cache allocation patches(dependent on prep patches) adds a cgroup

[PATCH 1/9] x86/intel_cqm: Modify hot cpu notification handling

2015-06-25 Thread Vikas Shivappa
sibling during cpu exit, it uses the same map instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu

[PATCH 8/9] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-25 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 89 - 1 file changed, 87 insertions(+), 2 deletions

[PATCH 9/9] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-25 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 28886be..10e1a5b

[PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management

2015-06-25 Thread Vikas Shivappa
. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205

[PATCH 5/9] x86/intel_rdt: Add new cgroup and Class of service management

2015-06-25 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid-CBM mapping. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch

[PATCH 3/9] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-06-25 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- Documentation/cgroups/rdt.txt | 215 ++ 1 file

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: +/* + * cbm_update_msrs() - Updates all the existing IA32_L3_MASK_n MSRs + * which are one per CLOSid except IA32_L3_MASK_0 on the current package. + */ +static inline void cbm_update_msrs(void

Re: [PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: This patch modifies hot cpu notification handling in Intel cache monitoring: - to add a new cpu to the cqm_cpumask(which has one cpu per package) during cpu start, it uses the existing package<-&g

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also ret

Re: [PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: This patch modifies hot cpu notification handling in Intel cache monitoring: - to add a new cpu to the cqm_cpumask(which has one cpu per package) during cpu start, it uses the existing package-core

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: +/* + * cbm_update_msrs() - Updates all the existing IA32_L3_MASK_n MSRs + * which are one per CLOSid except IA32_L3_MASK_0 on the current package. + */ +static inline void cbm_update_msrs(void

[PATCH 06/10] x86/intel_rdt: Add new cgroup and Class of service management

2015-06-23 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid<->CBM mapping. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel

[PATCH 04/10] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-06-23 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa --- Documentation/cgroups/rdt.txt | 215 ++ 1 file changed, 215 insertions(+) create

[PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-23 Thread Vikas Shivappa
online sibling during cpu exit, it uses the cpumask_any_online_but instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kern

[PATCH 05/10] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-23 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa --- arch/x86/include

[PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-23 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 84 - 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu

[PATCH 07/10] x86/intel_rdt: Add support for cache bit mask management

2015-06-23 Thread Vikas Shivappa
cant CLOSids optimally. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205 ++

[PATCH 08/10] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-06-23 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu/intel_rdt.c| 17

[PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-23 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 24db9a0..e15dd96 100644 --- a/arch/x86/kernel

[PATCH 03/10] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-06-23 Thread Vikas Shivappa
search for the next online sibling during hot cpu exit, it uses the cpumask_any_online_but instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa --- arch/x86/kern

[PATCH V10 00/10] New cpumask API and Intel Cache Allocation support

2015-06-23 Thread Vikas Shivappa
This patch has some preparatory patches which add a new API cpumask_any_online_but and change hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems.

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-23 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa --- include/linux/cpum

Re: [PATCH v1 2/2] x86, perf,cqm: handle CPU hotplug

2015-06-23 Thread Vikas Shivappa
On Thu, 18 Jun 2015, Thomas Gleixner wrote: On Thu, 18 Jun 2015, Kanaka Juvva wrote: Added lock in event reader function. The cqm_pick_event_reader() function accesses cqm_cpumask and it is critical section between this and cqm_stable(). This situation is true when a CPU is hotplugged.

Re: [PATCH v1 2/2] x86, perf,cqm: handle CPU hotplug

2015-06-23 Thread Vikas Shivappa
On Thu, 18 Jun 2015, Thomas Gleixner wrote: On Thu, 18 Jun 2015, Kanaka Juvva wrote: Added lock in event reader function. The cqm_pick_event_reader() function accesses cqm_cpumask and it is critical section between this and cqm_stable(). This situation is true when a CPU is hotplugged.

[PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-23 Thread Vikas Shivappa
of existing MSRs. Also the software cache for IA32_PQR_ASSOC MSRs are updated during hot cpu notifications. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 84 - 1 file changed, 82 insertions(+), 2 deletions

[PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-23 Thread Vikas Shivappa
sibling during cpu exit, it uses the cpumask_any_online_but instead of looping through all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86

[PATCH 05/10] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-23 Thread Vikas Shivappa
data into the cache. The programming of the hardware is done via programming MSRs(model specific registers). More information about Cache allocation be found in the Intel (R) x86 Architecture Software Developer Manual,Volume 3, section 17.15. Signed-off-by: Vikas Shivappa vikas.shiva

[PATCH 07/10] x86/intel_rdt: Add support for cache bit mask management

2015-06-23 Thread Vikas Shivappa
. - This also implies that during context switch, write to PQR-MSR is done only when a task with a different bitmask is scheduled in. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 3 + arch/x86/kernel/cpu/intel_rdt.c | 205

[PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-23 Thread Vikas Shivappa
. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 24db9a0..e15dd96

[PATCH 08/10] x86/intel_rdt: Implement scheduling support for Intel RDT

2015-06-23 Thread Vikas Shivappa
frequency. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch/x86/include/asm/intel_rdt.h | 45 ++ arch/x86/include/asm/rdt_common.h | 25 + arch/x86/include/asm/switch_to.h | 3 ++ arch/x86/kernel/cpu

[PATCH 04/10] x86/intel_rdt: Cache Allocation documentation and cgroup usage guide

2015-06-23 Thread Vikas Shivappa
which may be overlapping with other 'subsets'. This feature is used when allocating a line in cache ie when pulling new data into the cache. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- Documentation/cgroups/rdt.txt | 215 ++ 1 file

[PATCH 06/10] x86/intel_rdt: Add new cgroup and Class of service management

2015-06-23 Thread Vikas Shivappa
an associated CLOSid. However if multiple cgroups have the same cache mask they would also have the same CLOSid. The reference count parameter in CLOSid-CBM map keeps track of how many cgroups are using each CLOSid-CBM mapping. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- arch

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-23 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com --- include/linux

[PATCH V10 00/10] New cpumask API and Intel Cache Allocation support

2015-06-23 Thread Vikas Shivappa
This patch has some preparatory patches which add a new API cpumask_any_online_but and change hot cpu handling code in existing cache monitoring and RAPL kernel code. This improves hot cpu notification handling by not looping through all online cpus which could be expensive in large systems.

[PATCH 03/10] x86/intel_rapl: Modify hot cpu notification handling for RAPL

2015-06-23 Thread Vikas Shivappa
for the next online sibling during hot cpu exit, it uses the cpumask_any_online_but instead of looping all online cpus. In large systems with large number of cpus the time taken to loop may be expensive and also the time increase linearly. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-19 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Tue, 16 Jun 2015, Vikas Shivappa wrote: On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Fri, 12 Jun 2015, Vikas Shivappa wrote: +static inline void intel_rdt_cpu_start(int cpu) +{ + struct intel_pqr_state *state = _cpu(pqr_state, cpu

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-19 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Tue, 16 Jun 2015, Vikas Shivappa wrote: On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Fri, 12 Jun 2015, Vikas Shivappa wrote: +static inline void intel_rdt_cpu_start(int cpu) +{ + struct intel_pqr_state *state = per_cpu(pqr_state, cpu

Re: [PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-17 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Peter Zijlstra wrote: On Mon, Jun 15, 2015 at 02:44:32PM -0700, Vikas Shivappa wrote: Secondly, there's more HSW models: case 60: /* 22nm Haswell Core */ case 63: /* 22nm Haswell Server */ case 69: /* 22nm Haswell ULT */ case 70: /* 22nm Haswell

Re: [PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-17 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Peter Zijlstra wrote: On Mon, Jun 15, 2015 at 02:44:32PM -0700, Vikas Shivappa wrote: Secondly, there's more HSW models: case 60: /* 22nm Haswell Core */ case 63: /* 22nm Haswell Server */ case 69: /* 22nm Haswell ULT */ case 70: /* 22nm Haswell

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Fri, 12 Jun 2015, Vikas Shivappa wrote: +static inline void intel_rdt_cpu_start(int cpu) +{ + struct intel_pqr_state *state = _cpu(pqr_state, cpu); + + state->closid = 0; + mutex_lock(_group_mutex); This is called f

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Mon, 15 Jun 2015, Vikas Shivappa wrote: On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: + cpumask_and(, cpu_online_mask, mask); + cpumask_clear_cpu(cpu, ); + return

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Mon, 15 Jun 2015, Vikas Shivappa wrote: On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: + cpumask_and(tmp, cpu_online_mask, mask); + cpumask_clear_cpu(cpu, tmp

Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache Allocation

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Fri, 12 Jun 2015, Vikas Shivappa wrote: +static inline void intel_rdt_cpu_start(int cpu) +{ + struct intel_pqr_state *state = per_cpu(pqr_state, cpu); + + state-closid = 0; + mutex_lock(rdt_group_mutex); This is called from

Re: [PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:17AM -0700, Vikas Shivappa wrote: + /* +* Probe test for Haswell CPUs. +*/ + if (c->x86 == 0x6 && c->x86_model == 0x3f) + return hsw_probetest(); Firstly,

Re: [PATCH 05/10] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:12AM -0700, Vikas Shivappa wrote: + /* Additional Intel-defined flags: level 0x0010 */ + if (c->cpuid_level >= 0x0010) { + u32 eax, ebx, ecx, edx; + + cpuid

Re: [PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:09AM -0700, Vikas Shivappa wrote: static inline void cqm_pick_event_reader(int cpu) { - int phys_id = topology_physical_package_id(cpu); - int i; + struct cpumask tmp; No cpumasks on stacks. ok

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but(

Re: [PATCH 05/10] x86/intel_rdt: Add support for Cache Allocation detection

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:12AM -0700, Vikas Shivappa wrote: + /* Additional Intel-defined flags: level 0x0010 */ + if (c-cpuid_level = 0x0010) { + u32 eax, ebx, ecx, edx; + + cpuid_count(0x0010

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also

Re: [PATCH 02/10] x86/intel_cqm: Modify hot cpu notification handling

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:09AM -0700, Vikas Shivappa wrote: static inline void cqm_pick_event_reader(int cpu) { - int phys_id = topology_physical_package_id(cpu); - int i; + struct cpumask tmp; No cpumasks on stacks. ok

Re: [PATCH 10/10] x86/intel_rdt: Intel haswell Cache Allocation enumeration

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:17AM -0700, Vikas Shivappa wrote: + /* +* Probe test for Haswell CPUs. +*/ + if (c-x86 == 0x6 c-x86_model == 0x3f) + return hsw_probetest(); Firstly, isn't a probe already

<    3   4   5   6   7   8   9   10   11   >