From owner-freebsd-current Sun Jul 19 05:43:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA11678 for freebsd-current-outgoing; Sun, 19 Jul 1998 05:43:19 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA11657 for ; Sun, 19 Jul 1998 05:43:13 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from gate.lan.awfulhak.org (brian@localhost [127.0.0.1]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id NAA04615; Sun, 19 Jul 1998 13:00:59 +0100 (BST) (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199807191200.NAA04615@awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: jak@cetlink.net, freebsd-current@FreeBSD.ORG Subject: Re: tickadj -t not changing tick In-reply-to: Your message of "Wed, 15 Jul 1998 13:30:29 +1000." <199807150330.NAA22646@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Jul 1998 13:00:58 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [.....] > 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 : 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 , , 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