Re: [Bug #10710] [BISECTED] Lots of "rescheduling IPIs" in powertop

From: Andi Kleen
Date: Sun May 18 2008 - 13:59:54 EST


Vegard Nossum wrote:
> On Sun, May 18, 2008 at 1:13 PM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
>> This message has been generated automatically as a part of a report
>> of recent regressions.
>>
>> The following bug entry is on the current list of known regressions
>> from 2.6.25. Please verify if it still should be listed.
>>
>>
>> Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=10710
>> Subject : [BISECTED] Lots of "rescheduling IPIs" in powertop
>> Submitter : Vegard Nossum <vegard.nossum@xxxxxxxxx>
>> Date : 2008-05-13 20:42 (6 days old)
>> References : http://marc.info/?l=linux-kernel&amp;m=121071176205864&amp;w=4
>> Handled-By : Andi Kleen <andi@xxxxxxxxxxxxxx>
>> Arjan van de Ven <arjan@xxxxxxxxxxxxx>
>> Ingo Molnar <mingo@xxxxxxx>
>> Patch : http://marc.info/?l=linux-kernel&amp;m=121074826823352&amp;w=4
>>
>
> Ingo Molnar provided the patch that solved the problem (the referenced
> link) but he wanted to wait for Andreas Herrmann to provide an
> additional patch that would solve some implication on AMD CPUs. So
> this is in theory fixed, but the fix has not yet been applied anywhere
> as far as I know.

There's a CPUID way to distingush the cases I found out now (with help
from Venki, thanks) so it would be possible to solve it properly, but
once even a bad Ingo patch is in it's nearly impossible to replace it
with something better so I bail out at this point.

[In case someone is interested it's CPUID 5 ECX bit 0 which enumerates
if the MWAIT enumeration is there. So the correct mwait_usable() that
would have avoided your problem would be something like (untested):

return c->cpuid_level >= 5 &&
((cpuid_ecx(5) & 1) == 0 || (cpuid_edx(5) >> 4) & 0xf) > 0);
]

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/