public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ingo Molnar <mingo@elte.hu>,
	akpm@linux-foundation.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [patch 17/17] x86 trace clock
Date: Wed, 26 Nov 2008 18:32:04 +0100	[thread overview]
Message-ID: <878wr64cmj.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20081126124637.043515637@polymtl.ca> (Mathieu Desnoyers's message of "Wed, 26 Nov 2008 07:43:03 -0500")

Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> writes:

> X86 trace clock. Depends on tsc_sync to detect if timestamp counters are
> synchronized on the machine.

For that tsc_sync needs to be fixed first? e.g. see thread about
it firing incorrectly on vmware some time ago.

> A "Big Fat" (TM) warning is shown on the console when the trace clock is used on
> systems without synchronized TSCs to tell the user to
>

How about Intel systems where the TSC only stops in C3 and deeper?
You don't seem to handle that case well.

On modern Intel systems that's a common case.
> +			new_tsc = last_tsc + TRACE_CLOCK_MIN_PROBE_DURATION;
> +		/*
> +		 * If cmpxchg fails with a value higher than the new_tsc, don't
> +		 * retry : the value has been incremented and the events
> +		 * happened almost at the same time.
> +		 * We must retry if cmpxchg fails with a lower value :
> +		 * it means that we are the CPU with highest frequency and
> +		 * therefore MUST update the value.

Sorry but any global TSC measurements without scaling when the TSCs
run on different frequencies just don't make sense. The results will
be always poor. You really have to scale appropimately then and also
handle the "instable period"

-Andi

-- 
ak@linux.intel.com

  reply	other threads:[~2008-11-26 17:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26 12:42 [patch 00/17] Trace Clock v4 Mathieu Desnoyers
2008-11-26 12:42 ` [patch 01/17] get_cycles() : kconfig HAVE_GET_CYCLES Mathieu Desnoyers
2008-11-26 12:42 ` [patch 02/17] get_cycles() : x86 HAVE_GET_CYCLES Mathieu Desnoyers
2008-11-26 12:42 ` [patch 03/17] get_cycles() : sparc64 HAVE_GET_CYCLES Mathieu Desnoyers
2008-11-26 12:42 ` [patch 04/17] get_cycles() : powerpc64 HAVE_GET_CYCLES Mathieu Desnoyers
2008-11-26 12:42 ` [patch 05/17] MIPS : export hpt frequency for get_cycles Mathieu Desnoyers
2008-11-26 12:42 ` [patch 06/17] get_cycles() : MIPS HAVE_GET_CYCLES_32 Mathieu Desnoyers
2008-11-26 12:42 ` [patch 07/17] Trace clock core Mathieu Desnoyers
2008-11-26 12:42 ` [patch 08/17] Trace clock generic Mathieu Desnoyers
2008-11-26 12:42 ` [patch 09/17] Powerpc : Trace clock Mathieu Desnoyers
2008-11-26 12:42 ` [patch 10/17] Sparc64 " Mathieu Desnoyers
2008-11-26 12:42 ` [patch 11/17] LTTng timestamp sh Mathieu Desnoyers
2008-11-26 12:42 ` [patch 12/17] LTTng - TSC synchronicity test Mathieu Desnoyers
2008-11-26 12:42 ` [patch 13/17] x86 : remove arch-specific tsc_sync.c Mathieu Desnoyers
2008-11-26 12:43 ` [patch 14/17] MIPS use tsc_sync.c Mathieu Desnoyers
2008-11-26 12:43 ` [patch 15/17] MIPS create empty sync_core() Mathieu Desnoyers
2008-11-26 12:43 ` [patch 16/17] MIPS : Trace clock Mathieu Desnoyers
2008-11-26 12:43 ` [patch 17/17] x86 trace clock Mathieu Desnoyers
2008-11-26 17:32   ` Andi Kleen [this message]
2008-11-28 14:17     ` Mathieu Desnoyers
  -- strict thread matches above, loose matches on Subject: below --
2008-11-12 23:15 [patch 00/17] Trace Clock v3 Mathieu Desnoyers
2008-11-12 23:16 ` [patch 17/17] x86 trace clock Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878wr64cmj.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox