Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1510585
| From | "Charles (Chas) Williams" <ciwillia@brocade.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() |
| Date | 2016-10-27 21:10 +0200 |
| Message-ID | <swYdQ-5WT-11@gated-at.bofh.it> (permalink) |
| References | <sus8p-3Z6-9@gated-at.bofh.it> <suFIm-4q7-7@gated-at.bofh.it> <suPeG-2CB-15@gated-at.bofh.it> <sw91D-5BL-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/25/2016 08:22 AM, Sebastian Andrzej Siewior wrote:
> On 2016-10-21 17:03:56 [-0400], Charles (Chas) Williams wrote:
>> [ 3.107126] init_rapl_pmus: maxpkg 4
> there! vmware bug. It probably worked by chance.
Yes, the behavior is a bit random.
> I assume "init_rapl_pmus: maxpkg 4" is from init_rapl_pmus() returning
> topology_max_packages(). So it says 4 but then returns 65535 for CPU 2
> and 3. That -1 comes probably from topology_update_package_map(). Could
> you please send a complete boot log and try the following patch? This
> one should fix your boot problem and disable RAPL if the info is
> invalid.
But sometimes the topology info is correct and if I get lucky, the
package id could be valid for all the CPU's. Given the behavior,
I have seen so far it makes me thing the RAPL isn't being emulated.
So even if I did boot onto a "valid" set of cores, would I always be
certain that I will be on those cores?
> diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c
> index 0a535cea8ff3..f5d85f2853d7 100644
> --- a/arch/x86/events/intel/rapl.c
> +++ b/arch/x86/events/intel/rapl.c
> @@ -682,6 +682,15 @@ static int __init init_rapl_pmus(void)
> {
> int maxpkg = topology_max_packages();
> size_t size;
> + unsigned int cpu;
> +
> + for_each_possible_cpu(cpu) {
> + if (topology_logical_package_id(cpu) >= maxpkg) {
> + pr_err("rapl pmu error: max package: %u but CPU%d belongs to %u\n",
> + maxpkg, cpu, topology_logical_package_id(cpu));
> + return -EINVAL;
> + }
> + }
>
> size = sizeof(*rapl_pmus) + maxpkg * sizeof(struct rapl_pmu *);
> rapl_pmus = kzalloc(size, GFP_KERNEL);
Per your request in your next email:
>One thing I forgot to ask: Could you please check if you get the same
>pkgid reported for cpu 0-3 on a pre-v4.8 kernel? (before the hotplug
>rework).
Our previous kernel was 4.4, and didn't use the logical package id:
/* check if phys_is is already covered */
for_each_cpu(i, &rapl_cpu_mask) {
if (phys_id == topology_physical_package_id(i))
return;
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() "Charles (Chas) Williams" <ciwillia@brocade.com> - 2016-10-27 21:10 +0200
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-10-28 10:10 +0200
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() "M. Vefa Bicakci" <m.v.b@runbox.com> - 2016-11-01 11:40 +0100
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-02 18:30 +0100
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() "M. Vefa Bicakci" <m.v.b@runbox.com> - 2016-11-03 19:30 +0100
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() "Charles (Chas) Williams" <ciwillia@brocade.com> - 2016-11-02 10:40 +0100
Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-02 11:00 +0100
csiph-web