Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 1998 13:00:58 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        jak@cetlink.net, freebsd-current@FreeBSD.ORG
Subject:   Re: tickadj -t not changing tick 
Message-ID:  <199807191200.NAA04615@awfulhak.org>
In-Reply-To: Your message of "Wed, 15 Jul 1998 13:30:29 %2B1000." <199807150330.NAA22646@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
[.....]
> The relevant sysctl variables depend on the the FreeBSD version and
> configuration:
> 
> machdep.i8254_freq: always exists, never hurts to set it right, but only
> 	essential for it to be right on systems using it for timekeeping
> 	(2.2., -current on sub-586's and 586+'s running SMP or APM.
> machdep.i586_freq: 2.2 name for machdep.tsc_freq.  Doesn't hurt to set it
> 	right, but not essential for it it be right.
> machdep.tsc_freq: -current only, must be right if it is used for timekeeping.
> 	It is used on 586+'s not running SMP or APM.

Hmm, I have a timer problem with a Compaq Presario (notebook).  It 
seems that the timer chip (i8254 is the only one probed) is acting a 
big strangely and returning ``past'' times - this is disastrous at 
the start of a programs life as it tends to exceed the maximum 
runtime (all set correctly to infinity in login.conf) and result in a 
sig 24.

I don't know if anyone's interested in figuring out what may be the 
problem, I'm at a bit of a loss.  This is what I've found out so far:

The laptop:

: FreeBSD 3.0-CURRENT #10: Tue Jul 14 10:02:00 BST 1998
:     brian@woof.lan.awfulhak.org:/usr/src/sys/compile/WOOF
: Timecounter "i8254"  frequency 1193182 Hz  cost 1296 ns
: CPU: Cyrix GXm (17.09-MHz 586-class CPU)
:   Origin = "CyrixInstead"  Id = 0x540  Stepping=0  DIR=0x3346
:   Features=0x808131<FPU,TSC,MSR,CX8,CMOV,MMX>
: real memory  = 33554432 (32768K bytes)
: avail memory = 30597120 (29880K bytes)

This is *really* a 233MHz chip.

I did the following:

: diff -u -r1.60 kern_synch.c
: --- kern_synch.c        1998/07/11 13:06:41     1.60
: +++ kern_synch.c        1998/07/14 00:18:55
: @@ -642,6 +642,9 @@
:          */
:         if (p->p_stat != SZOMB && p->p_runtime > p->p_limit->p_cpulimit) {
:                 rlim = &p->p_rlimit[RLIMIT_CPU];
: +#if 1
: +               printf("(%ld - %ld) + (%ld - %ld) * 1000000\n", switchtime.tv_usec, p->p_switchtime.tv_usec, switchtime.tv_sec, p->p_switchtime.tv_sec);
: +#else
:                 if (p->p_runtime / (rlim_t)1000000 >= rlim->rlim_max) {
:                         killproc(p, "exceeded maximum CPU limit");
:                 } else {
: @@ -651,6 +654,7 @@
:                                 rlim->rlim_cur += 5;
:                         }
:                 }
: +#endif
:         }
:  
:         /*

and now get the following diagnostics:

: (109003 - 117991) + (48301 - 48301) * 1000000
: (113819 - 110145) + (48301 - 48301) * 1000000
: calcru: negative time of -882 usec for pid 23835 (sh)
: (242041 - 249374) + (48342 - 48342) * 1000000
: (246223 - 242900) + (48342 - 48342) * 1000000
: (247569 - 247149) + (48342 - 48342) * 1000000
: calcru: negative time of -7489 usec for pid 24361 (test)
: calcru: negative time of -6684 usec for pid 24629 (rm)
: (561792 - 568752) + (48430 - 48430) * 1000000
: (568400 - 563267) + (48430 - 48430) * 1000000
: (272816 - 277721) + (48553 - 48553) * 1000000
: (785726 - 792859) + (48571 - 48571) * 1000000

Any suggestions anyone ?  TIA.

> Bruce

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
Don't _EVER_ lose your sense of humour....



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



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