On Tuesday 18 November 2003 23:59, john stultz wrote: > On Mon, 2003-11-17 at 15:46, Thomas Schlichter wrote: > > But when booting with the PMTMR clock selected, my Interactivity test > > fails again. :-( Maybe there is a problem in the PMTMR's monotonic clock > > part...?! > > Good call! I was mis-adding in conversion to nanoseconds. The patch > below should fix it (Andrew, feel free to ignore this, I'll sync up all > the acpi-pm changes with you later). Well, your patch was the correct direction, but it did not completely reach the target... :-( The 'monotonic_base' variable in the PMTMR stores its value in microseconds. So the 'base' value has to be convertet to nanoseconds, too... A patch that corrects that is attached... (Btw. another solution would be to store all the values in nanoseconds by replacing the cyc2us function with a cyc2ns function...) > Although I'm finding that the sched_clock->monotonic_clock patch doesn't > look like a win. With that patch sched_clock takes ~400-700 cycles using > clock=pmtmr. With your "fix-sched_clock.diff" patch its less then 40 > cycles. > > While better accuracy is nice, I can't imagine the 10-20x cost of > sched_clock is worth it. So I think your fix is the best solution. I think you are right, but the sched_clock->monotonic_clock patch helped us finding the problems in the monotonic_clock_pmtmr() function... ;-) > thanks > -john np ;-) Thomas