Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2002 09:53:26 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        phk@critter.freebsd.dk
Subject:   Re: A question about timecounters 
Message-ID:  <200202051753.g15HrQh04002@vashon.polstra.com>
In-Reply-To: <90498.1012930272@critter.freebsd.dk>
References:  <90498.1012930272@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <90498.1012930272@critter.freebsd.dk>,
Poul-Henning Kamp  <phk@critter.freebsd.dk> wrote:
> In message <200202051723.g15HNH603801@vashon.polstra.com>, John Polstra writes:
> 
> >Agreed.  But in the cases I'm worrying about right now, the
> >timecounter is the TSC.
> 
> Now, *that* is very interesting, how reproducible is it ?

I can reproduce it pretty easily.  This is from a PIII/550:

    web1# uptime
     5:23PM  up 37 mins, 2 users, load averages: 0.08, 0.05, 0.01
    web1# dmesg | grep microuptime
    microuptime() went backwards (1992.7347381 -> 1991.587620)
    microuptime() went backwards (1992.7347381 -> 1991.620385)
    microuptime() went backwards (1992.7347381 -> 1991.621582)
    microuptime() went backwards (2016.7063298 -> 2015.272466)
    microuptime() went backwards (2286.7346482 -> 2285.587587)
    microuptime() went backwards (2286.7346482 -> 2285.593646)
    microuptime() went backwards (2286.7346482 -> 2285.595103)
    microuptime() went backwards (2286.7346482 -> 2285.617023)

Now, two things are unusual about this system.  First, I have it
pumping packets from inside the kernel (with a special netgraph node)
at a rate which is keeping the system about 95% busy processing
interrupts.  (That's about 330K packets/second.)  That definitely
makes it happen more often.  But I also see it occasionally when the
system is sitting idle.  Second, I have HZ set to 10000.  I think that
also contributes to the problem.  It shouldn't, though.  Not even a
PII/400 breathes hard at HZ=10000.

On another system which is mostly idle, I see it about 4 times a
day.  That system also has HZ set to 10000.  It's a PIII/1.13 GHz:

    microuptime() went backwards (200671.582473 -> 200671.582472)
    microuptime() went backwards (222622.358518 -> 222622.358517)
    microuptime() went backwards (228934.897839 -> 228934.897838)
    microuptime() went backwards (246166.386301 -> 246166.386300)
    microuptime() went backwards (263484.488575 -> 263484.488574)

Notice the difference on this system that's fairly idle.  On the
other system, it was the seconds going backward.  Here it's the
microseconds.  These may be two entirely different problems.

> Can you try to MFC rev 1.111 and see if that changes anything ?

Sure.  I'll let you know.

John
-- 
  John Polstra
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202051753.g15HrQh04002>