linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] linux-2.5.59_getcycles_A0
Date: 07 Feb 2003 15:09:35 -0800	[thread overview]
Message-ID: <1044659375.18676.80.camel@w-jstultz2.beaverton.ibm.com> (raw)
In-Reply-To: <p73ptq3bxh6.fsf@oldwotan.suse.de>

On Fri, 2003-02-07 at 13:19, Andi Kleen wrote:
> john stultz <johnstul@us.ibm.com> writes:
> > 	This patch moves the get_cycles() implementation into the timer_opts
> > subsystem. This patch corrects issues between the hangcheck-timer code
> > and systems running with timer_cyclone. As an extra bonus, it removes
> > the CONFIG_X86_TSC #ifdef in get_cycles replacing it with
> > timer->get_cycles(). 
> 
> Is this really a good idea? get_cycles is normally not used to get accurate
> time, but just to get random numbers for /dev/random or quickly estimate
> some code (scheduler used to use it for that). I think the TSC even when
> unsynchronized is better for that than an external timer which potentially
> lower resolution and long access time.
> 
> If you really added it I would at least change the random device to 
> use the old macro.

I'm sorry, I'm not seeing get_cycles used in /dev/random (although they
do make a direct call to rdtsc if its available - which is fine, since
the TSCs I deal with daily just give random values anyway :). So I don't
believe that is a concern.  

Additionally, the hangcheck timer code does calculate time (although,
not system time) using get_cycles, and this gives them a good
abstraction so the right thing happens on the right box. 

Let me know if you have any other concerns.

thanks
-john








  reply	other threads:[~2003-02-07 23:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1044649542.18673.20.camel@w-jstultz2.beaverton.ibm.com.suse.lists.linux.kernel>
2003-02-07 21:19 ` [RFC][PATCH] linux-2.5.59_getcycles_A0 Andi Kleen
2003-02-07 23:09   ` john stultz [this message]
2003-02-08  0:18     ` Andi Kleen
2003-02-08  0:50       ` john stultz
2003-02-08  1:52         ` Andi Kleen
2003-02-08  1:57           ` Martin J. Bligh
2003-02-08  2:14           ` john stultz
2003-02-08  2:29             ` Andi Kleen
2003-02-08  2:42               ` john stultz
2003-02-08  3:41                 ` Andi Kleen
2003-02-10 22:06               ` Bill Davidsen
2003-02-07 20:25 john stultz

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=1044659375.18676.80.camel@w-jstultz2.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).