All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] sched_clock implementation
@ 2003-09-18 20:35 Matthew Wilcox
  2003-09-19 15:32 ` Joel Soete
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2003-09-18 20:35 UTC (permalink / raw)
  To: parisc-linux

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
 */

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 -----

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-06 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-18 20:35 [parisc-linux] sched_clock implementation Matthew Wilcox
2003-09-19 15:32 ` Joel Soete
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

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.