From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932500AbbFISoC (ORCPT ); Tue, 9 Jun 2015 14:44:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53257 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752335AbbFISn4 (ORCPT ); Tue, 9 Jun 2015 14:43:56 -0400 Date: Tue, 9 Jun 2015 20:43:48 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Peter Zijlstra , Thomas Gleixner , John Stultz , Aaron Lu , Tony Li , "Rafael J. Wysocki" , Suravee Suthikulanit , =?utf-8?B?RnLDqWTDqXJpYw==?= Weisbecker , "linux-kernel@vger.kernel.org" , Fengguang Wu , Len Brown , Ken Xue , Huang Rui , X86 ML Subject: Re: [PATCH v2 3/4] x86, mwaitt: introduce mwaix delay with a configurable timer Message-ID: <20150609184348.GJ22105@pd.tnic> References: <1433819621-15093-1-git-send-email-ray.huang@amd.com> <1433819621-15093-4-git-send-email-ray.huang@amd.com> <20150609092952.GR3644@twins.programming.kicks-ass.net> <1433869987.1495.53.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2015 at 10:55:15AM -0700, Andy Lutomirski wrote: > When I looked at the rdtsc ordering a couple years ago, I thought > about what it meant for rdtsc to be properly ordered. I decided that > proper rdtsc ordering meant that no one should ever be able to tell if > rdtsc ends up reordered. Concretely, I think that rdtsc should be > ordered like an x86 load from a shared memory location. The manuals > are vague but, after a decent amount of experimentation, > rdtsc_barrier(); rdtsc() seems to achieve that on all CPUs. With the > barrier, the rdtsc won't happen before a prior load in the same > thread, and no CPU seems to ever execute rdtsc after a subsequent > memory access. That sounds weak to me. I think we will need some enlightenment from hw people here before we go assume stuff. > > By virtue of the address dependency? > > No, it's just that CPUs seem to work this way. Err, that sounds funny. And it must be the data dependency forcing the RDTSC to execute in order in that case. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --