lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsched_clock() has poor resolution
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-20 12:06    [W:0.168 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site