Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Joel Soete <joel.soete@tiscali.be>
To: Matthew Wilcox <willy@debian.org>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] sched_clock implementation
Date: Fri, 19 Sep 2003 15:32:41 +0000	[thread overview]
Message-ID: <3F6B2199.8050402@tiscali.be> (raw)
In-Reply-To: <20030918203510.GD21596@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox wrote:

>Anyone want to do better than the lame implementation?  ;-)
>
>----- Forwarded message from Andrew Morton <akpm@osdl.org> -----
>
>I'll be merging Ingo & Con's CPOU scheduler changes into Linus's tree soon.
>
>It does require that the architecture provides a new timing function:
>
>A lame implementation is:
>
>/*
> * Returns nanoseconds
> */
>  
>
Hi Willy,

(Certainly yet another stupid question but) to reach such accuracy we 
would need to have access to some 'time device' with an accuracy better 
then the nanosec (iirc 10^-9) (because it doesn't seems to me possible 
to get enough accuracy with cpu clock < 10^9 ie 1Ghz: the most case for 
parisc systems). Does it exist such device and where to start to read 
some doc?

Tanks,
    Joel

>unsigned long long sched_clock(void)
>{
>	return (unsigned long long)jiffies * (1000000000 / HZ);
>}
>
>But for best CPU scheduler results the architecture should try to return a
>higher-resolution number than this of course.
>
>sched_clock() has no absolute time requirements: it just has to return some
>number which goes up by 1,000,000,000 times per second.
>
>I already have implementations for x86, ppc, sparc64 and ia64.
>
>I have a completely stupid ppc64 implementation which is only accurate on
>1GHz CPUs.  Anton please note!
>
>As for the rest, it'll break the build, sorry.
>
>----- End forwarded message -----
>
>  
>

  reply	other threads:[~2003-09-19 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-18 20:35 [parisc-linux] sched_clock implementation Matthew Wilcox
2003-09-19 15:32 ` Joel Soete [this message]
2003-09-19 16:00   ` Carlos O'Donell
2003-09-19 16:11     ` Joel Soete
2003-09-20 18:02     ` Joel Soete
2003-09-21  0:04       ` Grant Grundler
2003-09-21 11:20         ` Helge Deller
2003-09-21 14:24           ` Carlos O'Donell
2003-10-05 15:43         ` Joel Soete
2003-10-06 14:20           ` Carlos O'Donell
     [not found]             ` <3F5CB6FB0000DCF3@ocpmta1.freegates.net>
2003-10-06 17:31               ` Carlos O'Donell

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=3F6B2199.8050402@tiscali.be \
    --to=joel.soete@tiscali.be \
    --cc=parisc-linux@parisc-linux.org \
    --cc=willy@debian.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