All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Erik Bosman <ejbosman@cs.vu.nl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Andrea Arcangeli <andrea@cpushare.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Add prctl commands PR_GET_TSC and PR_SET_TSC
Date: Sun, 13 Apr 2008 12:29:31 -0700	[thread overview]
Message-ID: <48025F1B.10701@zytor.com> (raw)
In-Reply-To: <87prstwvkr.fsf@basil.nowhere.org>

Andi Kleen wrote:
> Erik Bosman <ejbosman@cs.vu.nl> writes:
>> I'm using it for deterministic replay.
> 
> Ok that should be in the changelog.
> 
> BTW x86 CPUs are not fully deterministic. e.g. there are a few errata that
> can lead to differing EFLAGS (generally for instructions with undefined flags 
> output) based on random internal pipe line conditions.
> 

I think you have to define "x86 CPUs" more tightly for that.

> There's also RDPMC, but by default the kernel does not enable that
> for ring 3. And if you go for oddities there are the random number
> generator instructions on VIA CPUs which will obviously not 
> be repeatable.

There has been calls for an RDPMC counter which exposes true CPU cycles 
(varying with frequency, as opposed to wall time.)  And anything I/O -- 
including the RNG -- is obviously off.

I think what Erik is trying to do is to make it possible to disable as 
many of these in the kernel as possible; I/O is easy, it's off by 
default; RDTSC and RDPMC can be disabled in the kernel, and I think even 
XSTORE can be disabled.

	-hpa

  reply	other threads:[~2008-04-13 19:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 16:54 [PATCH 1/3] Add prctl commands PR_GET_TSC and PR_SET_TSC Erik Bosman
2008-04-13  9:07 ` Andi Kleen
2008-04-13  9:44   ` Erik Bosman
2008-04-13 16:47     ` Andi Kleen
2008-04-13 19:29       ` H. Peter Anvin [this message]
2008-04-13 20:50         ` Andi Kleen
2008-04-13 20:53           ` H. Peter Anvin

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=48025F1B.10701@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=andrea@cpushare.com \
    --cc=arjan@infradead.org \
    --cc=ejbosman@cs.vu.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.