RE: [PATCH]new ACPI processor driver to force CPUs idle

Pallipadi, Venkatesh
2009-07-07T00:48:28Z

>-----Original Message-----
>From: Andi Kleen [mailto:andi@firstfloor.org]
>Sent: Monday, July 06, 2009 4:44 PM
>To: Vaidyanathan Srinivasan
>Cc: Li, Shaohua; Peter Zijlstra; linux-acpi@vger.kernel.org;
>tglx@linutronix.de; lenb@kernel.org; Pallipadi, Venkatesh;
>andi@firstfloor.org; Ingo Molnar
>Subject: Re: [PATCH]new ACPI processor driver to force CPUs idle
>
>On Mon, Jul 06, 2009 at 11:33:12PM +0530, Vaidyanathan
>Srinivasan wrote:
>> > >
>> > > How do we handle interrupts and timers during this
>interval? You seem
>> > > to disable interrupts and hold the cpu at idle for 0.95
>sec. It may
>> > > cause timeouts and overflows for network interrupts right?
>> > The x86 mwait/monitor instruction can detect interrupt and
>complete execution
>> > even interrupt is disabled, so this isn't an issue.
>>
>> Cool, this will save a lot of trouble :)
>
>This is only available in newer Intel CPUs.
>

This is present in Intel Core/Core 2 and beyond.
Shaohua's patch is checking for this in init path

>
> + if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
> + !(ecx & CPUID5_ECX_INTERRUPT_BREAK))
> + return;
>

and -EINVALing when the feature is not present. So,
that will disable the feature on older CPUs.

Thanks,
Venki