lkml.org 
[lkml]   [2013]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86 idle: repair large-server 50-watt idle-power regression

* H. Peter Anvin <hpa@zytor.com> wrote:

> On 12/19/2013 08:21 AM, Peter Zijlstra wrote:
> >
> > What's that mb for?
> >
>
> It already exists in mwait_idle_with_hints(); I just moved it into
> this common function. It is a bit odd, I have to admit; it seems
> like it should be *before* the monitor (and possibly we should have
> one after the CLFLUSH as well?)

Yes, I think we need a barrier before the CLFLUSH, because according
to my reading of the Intel documentation CLFLUSH has no implicit
ordering so it might get reordered with the store to ->flags in
current_set_polling_and_test(), which might result in spurious wakeup
problems again.

(And CLFLUSH is a store in a sense, so special in that the regular
ordering for stores does not apply.)

Likewise, having a barrier before the MONITOR looks sensible as well.
Having it _after_ monitor looks weird and is probably wrong. [It might
have been the effects of someone seeing the spurious wakeup problems
with realizing the true source, or so.]

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-12-20 01:41    [W:0.344 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site