Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-21 Thread Shivappa Vikas



On Wed, 13 Jul 2016, Thomas Gleixner wrote:


On Tue, 12 Jul 2016, Fenghua Yu wrote:

 static int __init intel_rdt_late_init(void)
 {
struct cpuinfo_x86 *c = _cpu_data;
@@ -261,9 +331,15 @@ static int __init intel_rdt_late_init(void)
goto out_err;
}

+   cpu_notifier_register_begin();
+
for_each_online_cpu(i)
rdt_cpumask_update(i);

+   __hotcpu_notifier(intel_rdt_cpu_notifier, 0);


CPU hotplug notifiers are phased out. Please use the new state machine
interfaces.


Ok, I just see the patch for cqm with the new state machine. Also would need to 
remove the usage of the static tmp cpumask like we did in cqm.


Thanks,
Vikas



Thanks,

tglx



Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-21 Thread Shivappa Vikas



On Wed, 13 Jul 2016, Thomas Gleixner wrote:


On Tue, 12 Jul 2016, Fenghua Yu wrote:

 static int __init intel_rdt_late_init(void)
 {
struct cpuinfo_x86 *c = _cpu_data;
@@ -261,9 +331,15 @@ static int __init intel_rdt_late_init(void)
goto out_err;
}

+   cpu_notifier_register_begin();
+
for_each_online_cpu(i)
rdt_cpumask_update(i);

+   __hotcpu_notifier(intel_rdt_cpu_notifier, 0);


CPU hotplug notifiers are phased out. Please use the new state machine
interfaces.


Ok, I just see the patch for cqm with the new state machine. Also would need to 
remove the usage of the static tmp cpumask like we did in cqm.


Thanks,
Vikas



Thanks,

tglx



RE: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-14 Thread Yu, Fenghua
> 
> > +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);
> > +   if (rdt_cpumask_update(cpu))
> > +   smp_call_function_single(cpu, cbm_update_msrs, NULL, 1);
> > +   mutex_unlock(_group_mutex);
> 
> what happens if cpu's with a cache_id not available at boot comes online?

For L3, that case happens when a new socket is hot plugged into the platform.
We don't handle that right now because that needs platform support and I don't
have that kind of platform to test.

But maybe I can add that support in code and do a test in a simulated mode.
Basically that will create a new domain for the new cache_id.

Thanks.

-Fenghua


RE: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-14 Thread Yu, Fenghua
> 
> > +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);
> > +   if (rdt_cpumask_update(cpu))
> > +   smp_call_function_single(cpu, cbm_update_msrs, NULL, 1);
> > +   mutex_unlock(_group_mutex);
> 
> what happens if cpu's with a cache_id not available at boot comes online?

For L3, that case happens when a new socket is hot plugged into the platform.
We don't handle that right now because that needs platform support and I don't
have that kind of platform to test.

But maybe I can add that support in code and do a test in a simulated mode.
Basically that will create a new domain for the new cache_id.

Thanks.

-Fenghua


Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-13 Thread David Carrillo-Cisneros
> +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);
> +   if (rdt_cpumask_update(cpu))
> +   smp_call_function_single(cpu, cbm_update_msrs, NULL, 1);
> +   mutex_unlock(_group_mutex);

what happens if cpu's with a cache_id not available at boot comes online?


Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-13 Thread David Carrillo-Cisneros
> +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);
> +   if (rdt_cpumask_update(cpu))
> +   smp_call_function_single(cpu, cbm_update_msrs, NULL, 1);
> +   mutex_unlock(_group_mutex);

what happens if cpu's with a cache_id not available at boot comes online?


Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-13 Thread Thomas Gleixner
On Tue, 12 Jul 2016, Fenghua Yu wrote:
>  static int __init intel_rdt_late_init(void)
>  {
>   struct cpuinfo_x86 *c = _cpu_data;
> @@ -261,9 +331,15 @@ static int __init intel_rdt_late_init(void)
>   goto out_err;
>   }
>  
> + cpu_notifier_register_begin();
> +
>   for_each_online_cpu(i)
>   rdt_cpumask_update(i);
>  
> + __hotcpu_notifier(intel_rdt_cpu_notifier, 0);

CPU hotplug notifiers are phased out. Please use the new state machine
interfaces.

Thanks,

tglx


Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation

2016-07-13 Thread Thomas Gleixner
On Tue, 12 Jul 2016, Fenghua Yu wrote:
>  static int __init intel_rdt_late_init(void)
>  {
>   struct cpuinfo_x86 *c = _cpu_data;
> @@ -261,9 +331,15 @@ static int __init intel_rdt_late_init(void)
>   goto out_err;
>   }
>  
> + cpu_notifier_register_begin();
> +
>   for_each_online_cpu(i)
>   rdt_cpumask_update(i);
>  
> + __hotcpu_notifier(intel_rdt_cpu_notifier, 0);

CPU hotplug notifiers are phased out. Please use the new state machine
interfaces.

Thanks,

tglx