[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44cc7c3a-7114-4f37-a844-77e552dbc7aa@email.android.com>
Date: Thu, 19 Dec 2013 13:05:43 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
CC: Len Brown <lenb@...nel.org>, x86@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Len Brown <len.brown@...el.com>, stable@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <efault@....de>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86 idle: repair large-server 50-watt idle-power regression
CLFLUSH is only (guaranteed to be) ordered with respect to MFENCE according to the SDM.
Ingo Molnar <mingo@...nel.org> wrote:
>
>* Peter Zijlstra <peterz@...radead.org> wrote:
>
>> On Thu, Dec 19, 2013 at 06:25:35PM +0100, Peter Zijlstra wrote:
>> > On Thu, Dec 19, 2013 at 06:07:41PM +0100, Ingo Molnar wrote:
>> > > Likewise, having a barrier before the MONITOR looks sensible as
>well.
>> >
>> > I again have to disagree, one would expect monitor to flush all
>that is
>> > required to start the monitor -- and it actually does so. As is
>> > testified by this extra CLFLUSH being called a bug workaround.
>>
>> SDM states that MONITOR is ordered like a LOAD, and a LOAD cannot
>> pass a previous STORE to the same address.
>
>Yes ... but you could argue that CLFLUSH is neither a load nor a
>store, it's a _cache sync_ operation, with its special ordering
>properties.
>
>> That said; there's enough holes in there to swim a titanic through,
>> seeing how MONITOR stares at an entire cacheline and LOAD/STORE
>> order is specified on location, whatever that means.
>
>I think assuming that MONITOR is ordered as a load or better is a
>pretty safe one (and in fact the Intel documentation seems to say so)
>- I'd say MONITOR is in micro-code and essentially snoops on cache
>events on that specific cache line, and loads the cache line on a
>snoop hit?
>
>Btw., what state is the cache line after a MONITOR instruction, is it
>loaded as shared, or as excusive? (exclusive would probably be better
>for performance.)
>
>Thanks,
>
> Ingo
--
Sent from my mobile phone. Please pardon brevity and lack of formatting.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists