From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965277AbbKDK3r (ORCPT ); Wed, 4 Nov 2015 05:29:47 -0500 Received: from mail.skyhub.de ([78.46.96.112]:56509 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964964AbbKDK3p (ORCPT ); Wed, 4 Nov 2015 05:29:45 -0500 Date: Wed, 4 Nov 2015 11:29:41 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: Peter Zijlstra , x86-ml , Andy Lutomirski , Steven Rostedt , lkml Subject: Re: [PATCH -v2] x86: Kill notsc Message-ID: <20151104102941.GA1235@pd.tnic> References: <20151018142007.GA11294@pd.tnic> <20151021175803.GF3575@pd.tnic> <20151021190109.GC2508@worktop.programming.kicks-ass.net> <20151022185122.GC3442@pd.tnic> 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 Wed, Nov 04, 2015 at 11:21:45AM +0100, Thomas Gleixner wrote: > On Thu, 22 Oct 2015, Borislav Petkov wrote: > > u64 native_sched_clock(void) > > { > > - if (static_branch_likely(&__use_tsc)) { > > - u64 tsc_now = rdtsc(); > > - > > - /* return the value in ns */ > > - return cycles_2_ns(tsc_now); > > - } > > - > > +#ifdef CONFIG_X86_TSC > > + /* return the value in ns */ > > + return cycles_2_ns(rdtsc()); > > +#else > > /* > > - * Fall back to jiffies if there's no TSC available: > > - * ( But note that we still use it if the TSC is marked > > - * unstable. We do this because unlike Time Of Day, > > - * the scheduler clock tolerates small errors and it's > > - * very important for it to be as fast as the platform > > - * can achieve it. ) > > + * Fall back to jiffies if there's no TSC available: ( But note that we > > + * still use it if the TSC is marked unstable. We do this because unlike > > + * Time Of Day, the scheduler clock tolerates small errors and it's very > > + * important for it to be as fast as the platform can achieve it. ) > > This comment does not make any sense with this modification. Ok. My intention was to keep the aspect that we still can use the TSC here, even if it is marked unstable. I'll move it over rdtsc(). Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.