lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 Feb 2012 17:37:26 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Borislav Petkov <bp@...64.org>
Cc:	Stephane Eranian <eranian@...gle.com>,
	linux-kernel@...r.kernel.org, acme@...hat.com, mingo@...e.hu,
	robert.richter@....com, eric.dumazet@...il.com,
	Andreas Herrmann <andreas.herrmann3@....com>
Subject: Re: [BUG] perf: perf sched warning possibly due to clock
 granularity on AMD

On Mon, 2012-02-06 at 16:34 +0100, Borislav Petkov wrote:
> + Andreas.
> 
> On Mon, Feb 06, 2012 at 03:26:43PM +0100, Peter Zijlstra wrote:
> > On Mon, 2012-02-06 at 14:25 +0100, Stephane Eranian wrote:
> > > In summary, two issues:
> > >   - Why is sched_clock_stable not set or even tested on recent AMD systems?
> 
> AFAICT, sched_clock_stable is set on Intel under the following conditions:
> 
>         /*
>          * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
>          * with P/T states and does not stop in deep C-states.
>          *
>          * It is also reliable across cores and sockets. (but not across
>          * cabinets - we turn it off in that case explicitly.)
>          */
>         if (c->x86_power & (1 << 8)) {
>                 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
>                 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
>                 if (!check_tsc_unstable())
>                         sched_clock_stable = 1;
>         }
> 
> and yes, we can do CONSTANT_TSC and NONSTOP_TSC on the now older F10h
> already, so Bulldozer can do that too, implicitly.
> 
> I don't see why sched_clock_stable shouldn't be moved to generic x86
> code and set based on the two CPUID cap flags above.

stable means more than both those flags together.. 

 - CONSTANT_TSC means freq independent
 - NONSTOP_TSC means it doesn't get stopped in any C state

Together they make TSC completely C-state independent.
sched_clock_stable actually means that TSC is both _AND_ is consistent
across all CPUs in the entire system.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists