Received: by 10.213.65.68 with SMTP id h4csp1038076imn; Wed, 14 Mar 2018 07:49:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELtZWcsRLeuMhHVPbej0JS2+u60PU0XMC1aMbuluOwnIWbEzS1xHdMkpVJpvsefAucZ7qWf2 X-Received: by 2002:a17:902:70cb:: with SMTP id l11-v6mr4285730plt.192.1521038990260; Wed, 14 Mar 2018 07:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521038990; cv=none; d=google.com; s=arc-20160816; b=qtN1DOAfSAetmXmr6c5Le2d7KdUpKzjbzzDcjy58byOz2tR0rzbEYmVPwV9lnCpuwI SNCz5UDg7cFroAsYdP0g4hv+jn4f2kxhUoG+VQNZXxTOMuYh1JrAx6onBhakwYnD0rPp +4v8SzlQkbjOm8jmrNcpTSuvkksReMLD/3dKLFWFMujz8Z10SOedfsHTp5nuHdxoNniT ihAFqvnf7coThycF7CsHzxgNSuX90w3Zfpc9U3GCk+hEAC+hfXtOf4QJ2WxrY1ft4MGf Aooz4ijC0G7FgyUMkMzUCT+1Os7BGrSSM32BVm7ZxeARTYIGjEc5exdJfy6JyXmvlyuf aC5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=hbzIlfTv0Pjd/sYd2kuGAfiNOgrptSerhENAau+G2ww=; b=jA3gfY62KlcXE2YRH7SFa9nl7hHZfvBLXJXuc10uLER2ktI+GTxi72wIjUoPskUdGx ud7XJxpcRfCoc9HQYP4AExvsYOXK9yBxaNHsu+p2Q6tFTAzcQ4af8DdHyXlW37V9zW8i 7jaWdkeiexUfpbNKAQDeWQjUsQ9iB8zBOWK9HT7um0vl97YMqkXvXYU31qCV8yTeF0IT mAQ087XYVzXIYKhtERXcqfZ+jI00+ckYJEKa/7Czo5o7a7YtFu2GQdKaKGjAXOY0Zrr2 faIlCDXb00vuAEYUcnsOUHSEt3B/MS2EuEjOluGhDRnqS3fkddTFzl7UeLtiZhXs06HF 3g+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v23-v6si2071819plo.276.2018.03.14.07.49.35; Wed, 14 Mar 2018 07:49:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751679AbeCNOsO (ORCPT + 99 others); Wed, 14 Mar 2018 10:48:14 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51440 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbeCNOsN (ORCPT ); Wed, 14 Mar 2018 10:48:13 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ew7hL-0003Qr-Q6; Wed, 14 Mar 2018 15:48:11 +0100 Date: Wed, 14 Mar 2018 15:48:10 +0100 (CET) From: Thomas Gleixner To: jason.vas.dias@gmail.com cc: linux-kernel@vger.kernel.org, x86@kernel.org, mingo@kernel.org, peterz@infradead.org, andi@firstfloor.org Subject: Re: [PATCH v4.16-rc5 2/3] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW In-Reply-To: <1521001222-10712-3-git-send-email-jason.vas.dias@gmail.com> Message-ID: References: <1521001222-10712-1-git-send-email-jason.vas.dias@gmail.com> <1521001222-10712-3-git-send-email-jason.vas.dias@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Mar 2018, jason.vas.dias@gmail.com wrote: Again: Read and comply with Documentation/process/ and fix the complaints of checkpatch.pl. > diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c > index fbc7371..2c46675 100644 > --- a/arch/x86/entry/vdso/vclock_gettime.c > +++ b/arch/x86/entry/vdso/vclock_gettime.c > @@ -184,10 +184,9 @@ notrace static u64 vread_tsc(void) > > notrace static u64 vread_tsc_raw(void) > { > - u64 tsc > + u64 tsc = (gtod->has_rdtscp ? rdtscp((void*)0) : rdtsc_ordered()) > , last = gtod->raw_cycle_last; Aside of the totally broken coding style including usage of (void*)0 : Did you ever benchmark rdtscp() against rdtsc_ordered()? If so, then the results want to be documented in the changelog and this change only makes sense when rdtscp() is actually faster. Please document how you measured that so others can actually run the same tests and make their own judgement. If it would turn out that rdtscp() is faster, which I doubt, then the conditional is the wrong way to do that. It wants to be patched at boot time which completely avoids conditionals. Thanks, tglx