* sched_clock() has poor resolution
@ 2005-09-20 10:02 Pierre Ossman
0 siblings, 0 replies; only message in thread
From: Pierre Ossman @ 2005-09-20 10:02 UTC (permalink / raw)
To: LKML
I've been trying to hunt down a HZ bug and as part of that I thought
having printk timestamps would be nice. But too much dismay I noticed
that I couldn't get very good resolution out of these.
The problem turned out to be that sched_clock() uses jiffies as a time
source. It will only use the TSC if that's the primary time source of
the system. But since I have a PM timer that is given priority.
So I see two solutions here:
* Let sched_clock() follow the time source. Don't have it coupled to
the TSC.
* Init the TSC even though it isn't used for anything but sched_clock().
The first solution might have problems if one of the "better" timers are
slow as hell to read and the second if there is some assumed dependency
between sched_clock() and the primary timer. I'm blisfully ignorant of
this area so input is welcome.
Rgds
Pierre
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-20 10:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-20 10:02 sched_clock() has poor resolution Pierre Ossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®