Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbbFQLLt (ORCPT ); Wed, 17 Jun 2015 07:11:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45590 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbbFQLLo (ORCPT ); Wed, 17 Jun 2015 07:11:44 -0400 Date: Wed, 17 Jun 2015 13:11:41 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, Peter Zijlstra , John Stultz , linux-kernel@vger.kernel.org, Len Brown , Huang Rui , Denys Vlasenko , kvm@vger.kernel.org, Ralf Baechle Subject: Re: [PATCH v3 00/18] x86/tsc: Clean up rdtsc helpers Message-ID: <20150617111141.GF26661@pd.tnic> References: 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 Content-Length: 1974 Lines: 50 On Tue, Jun 16, 2015 at 05:35:48PM -0700, Andy Lutomirski wrote: > My sincere apologies for the spam. I send an unholy mixture of the > real patch set and an old poorly split-up patch set, and the result > is incomprehensible. Here's what I meant to send. > > After the some recent threads about rdtsc barriers, I remembered > that our RDTSC wrappers are a big mess. Let's clean it up. > > Currently we have rdtscl, rdtscll, native_read_tsc, > paravirt_read_tsc, and rdtsc_barrier. For people who haven't > noticed rdtsc_barrier and who haven't carefully read the docs, > there's no indication that all of the other accessors have a giant > ordering gotcha. The macro forms are ugly, and the paravirt > implementation is completely pointless. > > rdtscl is particularly awful. It reads the low bits. There are no > performance critical users of just the low bits anywhere in the > kernel. > > Clean it up. After this patch set, there are exactly three > functions. rdtsc_unordered() is a function that does a raw RDTSC > and returns a 64-bit number. rdtsc_ordered() is a function that > does a properly ordered RDTSC for general-purpose use. > barrier_before_rdtsc() is exactly what it sounds like. > > Changes from v2: > - Rename rdtsc_unordered to just rdtsc > - Get rid of rdtsc_barrier entirely instead of renaming it > - The KVM patch is new (see above) > - Added some acks peterz reminded me that I'm lazy actually and don't reply to each patch :) So, I like it, looks good, nice cleanup. It boots on my guest here - I haven't done any baremetal testing though. Let's give people some more time to look at it... Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/