lkml.org 
[lkml]   [2015]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] x86: Kill notsc
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.

Thanks,

tglx


\
 
 \ /
  Last update: 2015-11-04 11:41    [W:0.085 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site