lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/4] x86, mwaitt: introduce mwaitx idle with a configurable timer
On Thu, 21 May 2015, Borislav Petkov wrote:

> On Thu, May 21, 2015 at 10:56:32PM +0800, Huang Rui wrote:
> > Looks like good use case. Boris, could we try to implement it?
>
> Andy had some suggestions on how to do it here:
>
> https://lkml.kernel.org/r/555D3629.8080002@kernel.org
>
> which should be doable. Also, you'd probably need to set ECX[0]=0b too,
> so that MWAITX doesn't get woken up by interrupts while MWAIT-ing with
> interrupts disabled. I.e., this sequence:
>
> cli
> rdtsc
> shove the computed timeout into ebx
> mov $2,%ecx # this enables the timer and disables IRQs while MWAITing
> mwaitx
> sti

And the above sucks for udelay, because you disable interrupts for
random amounts of time.

Thanks,

tglx




\
 
 \ /
  Last update: 2015-05-21 21:41    [W:0.063 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site