Re: [PATCH 2/2] turbostat, add set_base_cpu()

2015-05-27 Thread Len Brown
> + base_cpu = sched_getcpu(); looks good. I combined this w/ the previous patch. I'll send this with some other patches to linux-pm shortly. If no problems, I'll offer the bundle of fixes to Linus for -rc5, else we'll get to it in the next merge window. thanks, Len Brown, Intel Open Source

RE: [PATCH 2/2] turbostat, add set_base_cpu()

2015-05-25 Thread Brown, Len
> -Original Message- > From: Prarit Bhargava [mailto:pra...@redhat.com] > Sent: Friday, May 22, 2015 6:30 PM > To: Brown, Len > Cc: linux-kernel@vger.kernel.org; linux...@vger.kernel.org; Semin, Andrey > Subject: Re: [PATCH 2/2] turbostat, add set_base_cpu() > >

[PATCH 2/2] turbostat, add set_base_cpu()

2015-05-25 Thread Prarit Bhargava
turbostat does not function properly on systems that support CPU0 hotplug. When running turbostat on these systems the following error is seen. [root@intel-chiefriver-04 ~]# turbostat ls turbostat: no /dev/cpu/0/msr Try "# modprobe msr": No such file or directory This happens because base_cpu is

Re: [PATCH 2/2] turbostat, add set_base_cpu()

2015-05-22 Thread Prarit Bhargava
On 05/22/2015 11:55 AM, Brown, Len wrote: >> +void set_base_cpu(void) >> +{ >> +int cpu; >> + >> +for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) { >> +if (cpu_is_not_present(cpu)) >> +continue; >> +base_cpu = cpu; >> +break; >> +}

Re: [PATCH 2/2] turbostat, add set_base_cpu()

2015-05-22 Thread Prarit Bhargava
On 05/22/2015 11:55 AM, Brown, Len wrote: >> +void set_base_cpu(void) >> +{ >> +int cpu; >> + >> +for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) { >> +if (cpu_is_not_present(cpu)) >> +continue; >> +base_cpu = cpu; >> +break; >> +}

RE: [PATCH 2/2] turbostat, add set_base_cpu()

2015-05-22 Thread Brown, Len
> +void set_base_cpu(void) > +{ > + int cpu; > + > + for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) { > + if (cpu_is_not_present(cpu)) > + continue; > + base_cpu = cpu; > + break; > + } > + > + if (base_cpu == -1) > +

[PATCH 2/2] turbostat, add set_base_cpu()

2015-05-22 Thread Prarit Bhargava
turbostat does not function properly on systems that support CPU0 hotplug. When running turbostat on these systems the following error is seen. [root@intel-chiefriver-04 ~]# turbostat ls turbostat: no /dev/cpu/0/msr Try "# modprobe msr": No such file or directory This happens because base_cpu is