In message <[EMAIL PROTECTED]>, John Polstra writes: >In article <[EMAIL PROTECTED]>, >Poul-Henning Kamp <[EMAIL PROTECTED]> wrote: >> In message <[EMAIL PROTECTED]>, John Polstra writes: >> >Yes, I think you're onto something now. It's a 550 MHz. machine, so >> >the TSC increments every 1.82 nsec. And 1.82 nsec * 2^32 is 7.81 >> >seconds. :-) >> >> In that case I'm almost willing to put an AnchorSteam on microuptime() >> being interrupted for more than good is in which case the splhigh() should >> cure it. > >I'm testing that now. But for how long would microuptime have to >be interrupted to make this happen? Surely not 7.81 seconds! On >this same machine I have a curses application running which is >updating the screen once a second. It never misses a beat, and >userland is very responsive.
Well, that is what I don't understand yet either :-) The fact that the delta is not exactly 2^32 * cpu clock is probably blindingly obviously indicative of "why", but I havn't solved the puzzle yet... Since you are running with a 10000 HZ, NTIMECOUNTER should probably be considerably increased. (Actually it might be a good idea to simply set NTIMECOUNTER == hz ... hmmm...) We could be seing a situation where a process is preempted in microuptime() and the timecounter ring being recycled *and* the hardware counter overflowing before it completes, that might give this problem. You didn't say if you ran with standard NTIMECOUNTER right now, but 5 would be awfully short time at HZ=10000: 500 usec... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message