lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 50 Watt idle power regression bisected to Linux-3.10

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, Dec 11, 2013 at 03:42:38PM +0100, Ingo Molnar wrote:
> > Another thing that is required I think is to issue a write barrier
> > before CLFLUSH instruction. By my (possibly incorrect ...) reading of
> > the documentation CLFLUSH does not appear to be ordered (at all), so
> > it might execute before the modification to the affected memory?
> >
> >
> > So something like:
> >
> > if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) {
> > smp_wmb(); /* order CLFLUSH */
> > clflush(&current_thread_info()->flags);
> > }
>
> smp_wmb() is a NO-OP on x86 remember :-)

Well, it's a compiler barrier but yes - I suspect a smp_mb() might be
needed - at least according to the CLFLUSH documentation it has no
implicit guaranteed ordering wrt. preceding writes.

Thanks,

Ingo


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