Re: [RFC PATCH 2/4] x86, mwaitt: introduce mwaitx idle with a configurable timer

From: Ingo Molnar
Date: Wed May 20 2015 - 07:41:34 EST



* Borislav Petkov <bp@xxxxxxx> wrote:

> On Wed, May 20, 2015 at 01:11:20PM +0200, Ingo Molnar wrote:
> > - MWAITX takes a 'timeout' parameter, but otherwise behaves exactly
> > like MWAIT: i.e. once idle it won't exit idle on its own
>
> Let me quote the commit message:
>
> "MWAITT, another name is MWAITX (MWAIT with extensions), has a
> configurable timer that causes MWAITX to exit on expiration."

Ah. A useful skill that is, being able to read.

> You need to set the second bit in ECX to enable the timer.
>
> I guess if you don't, then you get normal MWAIT but then you don't
> need the timeout either...

Yeah.

So if it's a true timeout then we could use it to implement irq-less
timers: that's actually pretty useful, because it could be faster than
getting a local APIC timer irq, etc.

Thanks,

Ingo
--
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/