From owner-freebsd-smp Sun Apr 5 01:07:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA18984 for freebsd-smp-outgoing; Sun, 5 Apr 1998 01:07:04 -0800 (PST) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA18874; Sun, 5 Apr 1998 01:05:27 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id TAA30092; Sun, 5 Apr 1998 19:03:15 +1000 Date: Sun, 5 Apr 1998 19:03:15 +1000 From: Bruce Evans Message-Id: <199804050903.TAA30092@godzilla.zeta.org.au> To: bde@zeta.org.au, peter@netplex.com.au, smp@FreeBSD.ORG Subject: Re: more SMP stuff Cc: phk@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I wrote: >nanosleep() is currently quite broken: >- EWOULDBLOCK is returned instead of 0 in most cases when the timeout > expires. Fixed by Peter. >- EWOULDBLOCK is returned instead of EINTR if an interrupt occurs and > syscalls are not being restarted after this interrupt. Actually, nanosleep() doesn't return in this case. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 01:31:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA21179 for freebsd-smp-outgoing; Sun, 5 Apr 1998 01:31:55 -0800 (PST) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA21143 for ; Sun, 5 Apr 1998 01:31:52 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id LAA06826; Sun, 5 Apr 1998 11:30:58 +0200 (CEST) To: Peter Wemm cc: smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 14:41:14 +0800." <199804050641.OAA06265@spinner.netplex.com.au> Date: Sun, 05 Apr 1998 11:30:58 +0200 Message-ID: <6824.891768658@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Uhm, one unfortunate effect of my changes is that the struct proc has the same size, but things were shuffled around in there, please recompile includes+libkvm+ps+top... -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 01:51:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA23431 for freebsd-smp-outgoing; Sun, 5 Apr 1998 01:51:34 -0800 (PST) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA23424; Sun, 5 Apr 1998 01:51:23 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id RAA08764; Sun, 5 Apr 1998 17:51:12 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199804050951.RAA08764@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: smp@FreeBSD.ORG, phk@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 19:03:15 +1000." <199804050903.TAA30092@godzilla.zeta.org.au> Date: Sun, 05 Apr 1998 17:51:11 +0800 From: Peter Wemm Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bruce Evans wrote: > I wrote: > >nanosleep() is currently quite broken: > >- EWOULDBLOCK is returned instead of 0 in most cases when the timeout > > expires. > > Fixed by Peter. > > >- EWOULDBLOCK is returned instead of EINTR if an interrupt occurs and > > syscalls are not being restarted after this interrupt. > > Actually, nanosleep() doesn't return in this case. I was using your diff to nanosleep, but a 1 second sleep started taking 724 seconds.... Perhaps it was the nanotime() twiddle I was trying.. > Bruce > Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 03:05:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA25047 for freebsd-smp-outgoing; Sun, 5 Apr 1998 03:05:46 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA25037; Sun, 5 Apr 1998 03:05:37 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id SAA08952; Sun, 5 Apr 1998 18:05:29 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199804051005.SAA08952@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: smp@FreeBSD.ORG, phk@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 19:03:15 +1000." <199804050903.TAA30092@godzilla.zeta.org.au> Date: Sun, 05 Apr 1998 18:05:28 +0800 From: Peter Wemm Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bruce Evans wrote: > I wrote: > >nanosleep() is currently quite broken: > >- EWOULDBLOCK is returned instead of 0 in most cases when the timeout > > expires. > > Fixed by Peter. > > >- EWOULDBLOCK is returned instead of EINTR if an interrupt occurs and > > syscalls are not being restarted after this interrupt. > > Actually, nanosleep() doesn't return in this case. > > Bruce Hmm.. setitimer() and getitimer() are broken too, at least for ITIMER_REAL as alarm(0) isn't returning the real remaining value. Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 03:31:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA28874 for freebsd-smp-outgoing; Sun, 5 Apr 1998 03:31:57 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA28866 for ; Sun, 5 Apr 1998 03:31:52 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id MAA07038; Sun, 5 Apr 1998 12:30:46 +0200 (CEST) To: Peter Wemm cc: Bruce Evans , smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 17:51:11 +0800." <199804050951.RAA08764@spinner.netplex.com.au> Date: Sun, 05 Apr 1998 12:30:45 +0200 Message-ID: <7036.891772245@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I just committed a working version of bruces diff. Bruce: just forgot to subtract the current "runtime" from the arg to tsleep. Poul-Henning In message <199804050951.RAA08764@spinner.netplex.com.au>, Peter Wemm writes: >Bruce Evans wrote: >> I wrote: >> >nanosleep() is currently quite broken: >> >- EWOULDBLOCK is returned instead of 0 in most cases when the timeout >> > expires. >> >> Fixed by Peter. >> >> >- EWOULDBLOCK is returned instead of EINTR if an interrupt occurs and >> > syscalls are not being restarted after this interrupt. >> >> Actually, nanosleep() doesn't return in this case. > >I was using your diff to nanosleep, but a 1 second sleep started taking >724 seconds.... Perhaps it was the nanotime() twiddle I was trying.. > > >> Bruce >> > >Cheers, >-Peter >-- >Peter Wemm Netplex Consulting > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-smp" in the body of the message > -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 03:46:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA00827 for freebsd-smp-outgoing; Sun, 5 Apr 1998 03:46:53 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA00816; Sun, 5 Apr 1998 03:46:39 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id UAA00537; Sun, 5 Apr 1998 20:43:14 +1000 Date: Sun, 5 Apr 1998 20:43:14 +1000 From: Bruce Evans Message-Id: <199804051043.UAA00537@godzilla.zeta.org.au> To: bde@zeta.org.au, peter@netplex.com.au Subject: Re: more SMP stuff Cc: phk@FreeBSD.ORG, smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >I was using your diff to nanosleep, but a 1 second sleep started taking >724 seconds.... Perhaps it was the nanotime() twiddle I was trying.. Hmm. I found the bug in microtime(): (1) the dummy timecounter has a frequency of only 10^5 Hz, but it runs much faster than that so we get too-large delta counts. (2) scale_micro = 10^9 * 2^32 / 10^5 / 10^3 doesn't fit in 32 bits, so the too-large delta counts are multipled by a garbage scale factor. microtime loops up to about 2^31 / 10^6 = 2000 times to reduce the garbage. nanotime() probably has the same bug, with a maximum loop count of about 2^63 / 10^9 = 9 * 10^9, but I haven't seen this yet. If the garbage is random, then delta is < 0 half the time, and the loop terminates early for the wrong reason. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 03:51:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA01403 for freebsd-smp-outgoing; Sun, 5 Apr 1998 03:51:55 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA01384 for ; Sun, 5 Apr 1998 03:51:49 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id MAA07130; Sun, 5 Apr 1998 12:50:33 +0200 (CEST) To: Bruce Evans cc: peter@netplex.com.au, smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 20:43:14 +1000." <199804051043.UAA00537@godzilla.zeta.org.au> Date: Sun, 05 Apr 1998 12:50:33 +0200 Message-ID: <7128.891773433@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199804051043.UAA00537@godzilla.zeta.org.au>, Bruce Evans writes: >>I was using your diff to nanosleep, but a 1 second sleep started taking >>724 seconds.... Perhaps it was the nanotime() twiddle I was trying.. > >Hmm. > >I found the bug in microtime(): >(1) the dummy timecounter has a frequency of only 10^5 Hz, but it runs > much faster than that so we get too-large delta counts. Ups, I intended that to be 10^6 Hz... This isn't it anyway, the dummy counter is only used by syscons screensaver calls to getmicroruntime(); -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 04:36:41 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA08273 for freebsd-smp-outgoing; Sun, 5 Apr 1998 04:36:41 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA08268 for ; Sun, 5 Apr 1998 04:36:38 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id NAA07209; Sun, 5 Apr 1998 13:32:42 +0200 (CEST) To: Peter Wemm cc: Bruce Evans , smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 18:05:28 +0800." <199804051005.SAA08952@spinner.netplex.com.au> Date: Sun, 05 Apr 1998 13:32:42 +0200 Message-ID: <7207.891775962@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199804051005.SAA08952@spinner.netplex.com.au>, Peter Wemm writes: >Hmm.. setitimer() and getitimer() are broken too, at least for ITIMER_REAL >as alarm(0) isn't returning the real remaining value. Yup, I missed on bit there too. I just posted a patch -current for testing. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 05:12:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA12474 for freebsd-smp-outgoing; Sun, 5 Apr 1998 05:12:24 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA12469 for ; Sun, 5 Apr 1998 05:12:22 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id WAA03352; Sun, 5 Apr 1998 22:09:39 +1000 Date: Sun, 5 Apr 1998 22:09:39 +1000 From: Bruce Evans Message-Id: <199804051209.WAA03352@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.freebsd.dk Subject: Re: more SMP stuff Cc: peter@netplex.com.au, smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>I found the bug in microtime(): >>(1) the dummy timecounter has a frequency of only 10^5 Hz, but it runs >> much faster than that so we get too-large delta counts. > >Ups, I intended that to be 10^6 Hz... The scaling needs to be more robust since the h/w counter might be slower than 10^6 hz. >This isn't it anyway, the dummy counter is only used by syscons >screensaver calls to getmicroruntime(); It's used by my version of the floppy driver which calls microtime() to timestamp certain events. I don't think I call nanotime() so early. My rtcintr() calls nanotime() to gather statistics, and nanotime() was reentered. I don't see any reentrancy problems. There will be one when nanotime updates tc->nanotime like it should. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 05:17:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA12978 for freebsd-smp-outgoing; Sun, 5 Apr 1998 05:17:48 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA12973 for ; Sun, 5 Apr 1998 05:17:45 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id OAA07435; Sun, 5 Apr 1998 14:14:37 +0200 (CEST) To: Bruce Evans cc: peter@netplex.com.au, smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 22:09:39 +1000." <199804051209.WAA03352@godzilla.zeta.org.au> Date: Sun, 05 Apr 1998 14:14:37 +0200 Message-ID: <7433.891778477@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199804051209.WAA03352@godzilla.zeta.org.au>, Bruce Evans writes: >>>I found the bug in microtime(): >>>(1) the dummy timecounter has a frequency of only 10^5 Hz, but it runs >>> much faster than that so we get too-large delta counts. >> >>Ups, I intended that to be 10^6 Hz... > >The scaling needs to be more robust since the h/w counter might be >slower than 10^6 hz. No, that is a design decision. Timecounter must be >= 1MHz. >>This isn't it anyway, the dummy counter is only used by syscons >>screensaver calls to getmicroruntime(); > >It's used by my version of the floppy driver which calls microtime() >to timestamp certain events. before the i8254 is initialized ? >I don't think I call nanotime() so early. My rtcintr() calls >nanotime() to gather statistics, and nanotime() was reentered. >I don't see any reentrancy problems. There will be one when >nanotime updates tc->nanotime like it should. No it shouldn't, I'm sorry but I cannot find a way where that makes fewer problems than it fixes... -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 06:10:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA16675 for freebsd-smp-outgoing; Sun, 5 Apr 1998 06:10:39 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA16669 for ; Sun, 5 Apr 1998 06:10:35 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id XAA05313; Sun, 5 Apr 1998 23:06:05 +1000 Date: Sun, 5 Apr 1998 23:06:05 +1000 From: Bruce Evans Message-Id: <199804051306.XAA05313@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.freebsd.dk Subject: Re: more SMP stuff Cc: peter@netplex.com.au, smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>The scaling needs to be more robust since the h/w counter might be >>slower than 10^6 hz. > >No, that is a design decision. Timecounter must be >= 1MHz. Why? The i8254 is only marginally faster than 1MHz. There's no reason to expect a faster clock unless the CPU clock can be read. >>>This isn't it anyway, the dummy counter is only used by syscons >>>screensaver calls to getmicroruntime(); >> >>It's used by my version of the floppy driver which calls microtime() >>to timestamp certain events. > >before the i8254 is initialized ? In fdprobe(), before the i8254 is completely initialized. >>I don't think I call nanotime() so early. My rtcintr() calls >>nanotime() to gather statistics, and nanotime() was reentered. >>I don't see any reentrancy problems. There will be one when >>nanotime updates tc->nanotime like it should. > >No it shouldn't, I'm sorry but I cannot find a way where that makes >fewer problems than it fixes... It is essential for POSIX.1 conformance and probably for `make' E.g., the following shows chmod()+stat() sometimes updating the ctime of a fifo apparently-before either is called. (POSIX.1 doesn't have gettimeofday(); this example uses it just to find a bad time and to show how close to the bad time we managed to do the chmod(). argv[1] can be set to a small integer to manually search for the window of bad times.) --- #include #include int main(int argc, char **argv) { unsigned delay; int try; struct stat sb; struct timeval tv0, tv1, tv2; unlink("f"); mkfifo("f", 0777); delay = argc <= 1 ? 0 : atoi(argv[1]); for (try = 0;; try++) { gettimeofday(&tv0, 0); while (1) { gettimeofday(&tv1, 0); if (tv1.tv_sec != tv0.tv_sec) break; } if (delay != 0) { while (--delay != 0) ; gettimeofday(&tv1, 0); } chmod("f", 0777); stat("f", &sb); gettimeofday(&tv2, 0); if (tv1.tv_sec > sb.st_ctime || tv2.tv_sec < sb.st_ctime) break; } printf("%d: %ld.%06ld %ld %ld.%06ld\n", try, tv1.tv_sec, tv1.tv_usec, sb.st_ctime, tv2.tv_sec, tv2.tv_usec); } --- Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 06:20:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA17728 for freebsd-smp-outgoing; Sun, 5 Apr 1998 06:20:52 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA17721 for ; Sun, 5 Apr 1998 06:20:49 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.5) with ESMTP id PAA07703; Sun, 5 Apr 1998 15:18:18 +0200 (CEST) To: Bruce Evans cc: peter@netplex.com.au, smp@FreeBSD.ORG Subject: Re: more SMP stuff In-reply-to: Your message of "Sun, 05 Apr 1998 23:06:05 +1000." <199804051306.XAA05313@godzilla.zeta.org.au> Date: Sun, 05 Apr 1998 15:18:17 +0200 Message-ID: <7701.891782297@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199804051306.XAA05313@godzilla.zeta.org.au>, Bruce Evans writes: >>>The scaling needs to be more robust since the h/w counter might be >>>slower than 10^6 hz. >> >>No, that is a design decision. Timecounter must be >= 1MHz. > >Why? The i8254 is only marginally faster than 1MHz. There's no >reason to expect a faster clock unless the CPU clock can be read. This is not NetBSD, we're looking at modern HW platforms, not needless and pointless generality... >>>It's used by my version of the floppy driver which calls microtime() >>>to timestamp certain events. >> >>before the i8254 is initialized ? > >In fdprobe(), before the i8254 is completely initialized. >>>I don't think I call nanotime() so early. My rtcintr() calls >>>nanotime() to gather statistics, and nanotime() was reentered. >>>I don't see any reentrancy problems. There will be one when >>>nanotime updates tc->nanotime like it should. >> >>No it shouldn't, I'm sorry but I cannot find a way where that makes >>fewer problems than it fixes... > >It is essential for POSIX.1 conformance and probably for `make' E.g., >the following shows chmod()+stat() sometimes updating the ctime of >a fifo apparently-before either is called. But the problem here is that the FS code uses the "cheap" version, not the correct version... They "shouldn't" do that... I can agree to update time_second in nanoµtime(), but not the tc->microtime & tc->nanotime, that is too expensive. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "Drink MONO-tonic, it goes down but it will NEVER come back up!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 16:29:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA21182 for freebsd-smp-outgoing; Sun, 5 Apr 1998 16:29:30 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA21118 for ; Sun, 5 Apr 1998 16:29:24 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id TAA24641; Sun, 5 Apr 1998 19:26:08 -0400 (EDT) From: Peter Dufault Message-Id: <199804052326.TAA24641@hda.hda.com> Subject: Re: beware! -current under SMP is "not looking good". In-Reply-To: <199804050750.PAA07051@spinner.netplex.com.au> from Peter Wemm at "Apr 5, 98 03:50:49 pm" To: peter@netplex.com.au (Peter Wemm) Date: Sun, 5 Apr 1998 19:26:07 -0400 (EDT) Cc: peter@netplex.com.au, smp@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > It seems that doing a 'setpriority()' is the last thing that happens > before the hang with ntpdate. I wonder if the posix4 stuff is having an > effect here? The latest round of changes were minor. The "maybe_resched" that went in near the beginning of March would be more likely to cause problems - that was what broke idle priority. That leaves a big window from the beginning of March until now so I expect the problem would have shown up earlier. Anyone suspecting them can roll back to the date of that last change to sys/_posix.h and verify if the problems are new or not. The only recent non-optional change is the check of the new scheduling classes in swtch.s and I don't think that can cause any problems. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Apr 5 21:04:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA14450 for freebsd-smp-outgoing; Sun, 5 Apr 1998 21:04:29 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA14431 for ; Sun, 5 Apr 1998 21:04:22 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id MAA05339; Mon, 6 Apr 1998 12:03:44 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199804060403.MAA05339@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Peter Dufault cc: smp@FreeBSD.ORG Subject: Re: beware! -current under SMP is "not looking good". In-reply-to: Your message of "Sun, 05 Apr 1998 19:26:07 -0400." <199804052326.TAA24641@hda.hda.com> Date: Mon, 06 Apr 1998 12:03:43 +0800 From: Peter Wemm Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Peter Dufault wrote: > > It seems that doing a 'setpriority()' is the last thing that happens > > before the hang with ntpdate. I wonder if the posix4 stuff is having an > > effect here? > > The latest round of changes were minor. The "maybe_resched" that went > in near the beginning of March would be more likely to cause problems - > that was what broke idle priority. I think the setitimer() problems turned out to be the culprit in this case, I should point out what I was concerned about.. maybe_resched() looks at the new process compared to the currently executing process on the current cpu. It looks like if the new process has a higher priority, then a reschedule is called. However, it doesn't check the other cpus.. Suppose the current cpu was be running a high priority process, and the "other" cpu could be running a max-nice process. If a new normal priority process was being activated, then a reschedule should be done so that the "other" cpu can pick up the new process. Otherwise, the intermediate priority process hangs around until the next roundrobin or whatever, and the max-nice process keeps on running for the rest of the period. However, this isn't what I'd call an earth-shattering problem. Anyway, things are looking a lot happier in -current at the moment... Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Apr 6 17:51:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA13769 for freebsd-smp-outgoing; Mon, 6 Apr 1998 17:51:51 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from bigbrother (bigbrother.rstcorp.com [206.29.49.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA13763 for ; Mon, 6 Apr 1998 17:51:48 -0700 (PDT) (envelope-from vshah@rstcorp.com) Received: (from uucp@localhost) by bigbrother (8.6.12/8.6.9) id VAA20354 for ; Mon, 6 Apr 1998 21:41:28 -0400 Received: from fault.rstcorp.com(206.29.49.18) by bigbrother.rstcorp.com via smap (V2.0) id xma020350; Mon, 6 Apr 98 21:41:03 -0400 Received: (from vshah@localhost) by rstcorp.com (8.8.1/8.8.1) id UAA05045; Mon, 6 Apr 1998 20:50:42 -0400 (EDT) Date: Mon, 6 Apr 1998 20:50:42 -0400 (EDT) Message-Id: <199804070050.UAA05045@rstcorp.com> MIME-Version: 1.0 From: "Viren R. Shah" To: freebsd-smp@FreeBSD.ORG Subject: mptable output: what does this indicate? ( Compaq ProLiant 2000 ) X-Mailer: VM 6.40 under 19.16 "Lille" XEmacs Lucid Reply-To: "Viren R. Shah" X-Face: )~y+U*K:yzjz{q<5lzpI_SVef'U.])9g[C9`1N@]u3,MHY7f*l7C)[_NjM4y4K8$uIUh|\u (K&&HS6,M!61&GMTk'mqmB/Qg]]X}"?TzsFl]"2v!bl8']dma.:^IY^a[lbOI>U:b<~FyK3q-p{HmZ mn~g.`~BE!5{2D:}Yi+\_KkWe?XaHj9$ko1k8iKLYv5*_2c8"G=?Up[}hn+7RNM(bzBZ_wWk6!Pf&B ?3Tcm7M7B~W%K/I0aX3]*=jP?aM]H6HBPT`oLk+0n^_;N\2\%|Rhy;p}34Q.jEsM\qtnxcm;ag%Nq Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The system is a Compaq ProLiant 2000 w/ dual P66, running a 2.2.6 system with a -current kernel. The mptable output is: --------------------------- bandersnatch# ./mptable -dmesg -grope -verbose =============================================================================== MPTable, version 2.0.15 looking for EBDA pointer @ 0x040e, found, searching EBDA @ 0x0009fc00 searching CMOS 'top of mem' @ 0x0009f800 (638K) searching default 'top of mem' @ 0x0009fc00 (639K) searching BIOS @ 0x000f0000 searching extended BIOS @ 0x000e0000 groping memory @ 0x00080000 groping memory @ 0x00090000 MP FPS NOT found, suggest trying -grope option!!! --------------------------- I figure this does not bode well for running SMP on this machine. Is there anything else I can try? Thanks Viren -- Viren R. Shah, {viren @ rstcorp . com} "Haajar te hathiyar" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Apr 6 19:55:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA04944 for freebsd-smp-outgoing; Mon, 6 Apr 1998 19:55:21 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA04913; Mon, 6 Apr 1998 19:55:17 -0700 (PDT) (envelope-from michaelh@cet.co.jp) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.8/CET-v2.2) with SMTP id CAA00801; Tue, 7 Apr 1998 02:54:28 GMT Date: Tue, 7 Apr 1998 11:54:28 +0900 (JST) From: Michael Hancock To: freebsd-fs@FreeBSD.ORG, tech-kern@netbsd.org, tech@openbsd.org, freebsd-smp@FreeBSD.ORG Subject: Re: VFS vrele fixes In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 6 Apr 1998, I wrote: > http://www.freebsd.org/~mch/vfs1.html If you reply publically, please trim the headers to the relevant mailing lists but keep me included because I'm not a member of all of them. Ok, I've gotten some positive comments on this. Here's a summary: 1) It's a nicer framework to experiment with alternative central vnode management systems such as per-CPU vnode pools. We can keep the existing standard implementation for UP, but distribute hot spots in an SMP version. 2) AFS people with source licenses like it because we can work around third party implementations that refuse to retain OS patches. 3) I should do locking state sooner. I'll get to it and the web page includes an implementation of vn_put() which will be used in the generic layer. Regards, Mike Hancock To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Apr 6 22:39:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA22926 for freebsd-smp-outgoing; Mon, 6 Apr 1998 22:39:25 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA22873 for ; Mon, 6 Apr 1998 22:39:19 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id NAA25859; Tue, 7 Apr 1998 13:39:03 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199804070539.NAA25859@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: "Viren R. Shah" cc: freebsd-smp@FreeBSD.ORG Subject: Re: mptable output: what does this indicate? ( Compaq ProLiant 2000 ) In-reply-to: Your message of "Mon, 06 Apr 1998 20:50:42 -0400." <199804070050.UAA05045@rstcorp.com> Date: Tue, 07 Apr 1998 13:38:55 +0800 From: Peter Wemm Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org "Viren R. Shah" wrote: > > The system is a Compaq ProLiant 2000 w/ dual P66, running a 2.2.6 > system with a -current kernel. > > The mptable output is: > --------------------------- > bandersnatch# ./mptable -dmesg -grope -verbose > > ============================================================================= == > > MPTable, version 2.0.15 > > looking for EBDA pointer @ 0x040e, found, searching EBDA @ 0x0009fc00 > searching CMOS 'top of mem' @ 0x0009f800 (638K) > searching default 'top of mem' @ 0x0009fc00 (639K) > searching BIOS @ 0x000f0000 > searching extended BIOS @ 0x000e0000 > groping memory @ 0x00080000 > groping memory @ 0x00090000 > > MP FPS NOT found, > suggest trying -grope option!!! > > --------------------------- > > I figure this does not bode well for running SMP on this machine. Is > there anything else I can try? I hate to say it, but if it's missing the mpspec tables then it's most likely to be missing the rest of the mpspec (apic) hardware. I'd bet that your machine is based on the Corollary SMP design or something like that. There's very little chance that FreeBSD will ever support that. Sorry.. (You might get the SCO MPX stuff to run since that works with C-bus etc) > Thanks > Viren > -- > Viren R. Shah, {viren @ rstcorp . com} > "Haajar te hathiyar" Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Apr 7 05:51:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA18338 for freebsd-smp-outgoing; Tue, 7 Apr 1998 05:51:18 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from bigbrother (bigbrother.rstcorp.com [206.29.49.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id FAA18246 for ; Tue, 7 Apr 1998 05:51:12 -0700 (PDT) (envelope-from vshah@rstcorp.com) Received: (from uucp@localhost) by bigbrother (8.6.12/8.6.9) id JAA23002; Tue, 7 Apr 1998 09:40:04 -0400 Received: from fault.rstcorp.com(206.29.49.18) by bigbrother.rstcorp.com via smap (V2.0) id xma022989; Tue, 7 Apr 98 09:39:19 -0400 Received: (from vshah@localhost) by rstcorp.com (8.8.1/8.8.1) id IAA05529; Tue, 7 Apr 1998 08:48:50 -0400 (EDT) Date: Tue, 7 Apr 1998 08:48:50 -0400 (EDT) Message-Id: <199804071248.IAA05529@rstcorp.com> From: "Viren R. Shah" To: Peter Wemm Cc: freebsd-smp@FreeBSD.ORG Subject: Re: mptable output: what does this indicate? ( Compaq ProLiant 2000 ) In-Reply-To: <199804070539.NAA25859@spinner.netplex.com.au> References: <199804070050.UAA05045@rstcorp.com> <199804070539.NAA25859@spinner.netplex.com.au> X-Mailer: VM 6.40 under 19.16 "Lille" XEmacs Lucid Reply-To: "Viren R. Shah" X-Face: )~y+U*K:yzjz{q<5lzpI_SVef'U.])9g[C9`1N@]u3,MHY7f*l7C)[_NjM4y4K8$uIUh|\u (K&&HS6,M!61&GMTk'mqmB/Qg]]X}"?TzsFl]"2v!bl8']dma.:^IY^a[lbOI>U:b<~FyK3q-p{HmZ mn~g.`~BE!5{2D:}Yi+\_KkWe?XaHj9$ko1k8iKLYv5*_2c8"G=?Up[}hn+7RNM(bzBZ_wWk6!Pf&B ?3Tcm7M7B~W%K/I0aX3]*=jP?aM]H6HBPT`oLk+0n^_;N\2\%|Rhy;p}34Q.jEsM\qtnxcm;ag%Nq Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> "Peter" == Peter Wemm writes: Peter> "Viren R. Shah" wrote: >> MP FPS NOT found, >> suggest trying -grope option!!! >> >> --------------------------- >> >> I figure this does not bode well for running SMP on this machine. Is >> there anything else I can try? Peter> hardware. I'd bet that your machine is based on the Corollary Peter> SMP design or something like that. There's very little chance Peter> that FreeBSD will ever support that. Oh well, I'll just stick with a uniprocessor kernel. I could use NT on it, since NT supports the Compaq SMP board, but I have enough of NT at work. Thanks for the information. Peter> Peter Wemm Netplex Consulting Viren -- Viren R. Shah, {viren @ rstcorp . com} http://www.rstcorp.com/~vshah/ ====== FreeBSD: It's free, it's fast, it's fun. ====== "3 syncs represent the trinity - init, the child and the eternal zombie process." -- Jordan Hubbard To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sat Apr 11 01:34:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07849 for freebsd-smp-outgoing; Sat, 11 Apr 1998 01:34:33 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from asteroid.svib.ru (root@asteroid.svib.ru [195.151.166.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07842 for ; Sat, 11 Apr 1998 01:34:28 -0700 (PDT) (envelope-from tarkhil@asteroid.svib.ru) Received: from minas-tirith.pol.ru (shuttle.svib.ru [195.151.166.144]) by asteroid.svib.ru (8.8.8/8.8.8) with ESMTP id MAA06992 for ; Sat, 11 Apr 1998 12:34:18 +0400 (MSD) (envelope-from tarkhil@asteroid.svib.ru) Received: from minas-tirith.pol.ru (minas-tirith.pol.ru [127.0.0.1]) by minas-tirith.pol.ru (8.8.8/8.8.7) with ESMTP id MAA01275 for ; Sat, 11 Apr 1998 12:34:42 +0400 (MSD) (envelope-from tarkhil@minas-tirith.pol.ru) Message-Id: <199804110834.MAA01275@minas-tirith.pol.ru> X-Mailer: exmh version 2.0.1 12/23/97 To: freebsd-smp@FreeBSD.ORG Reply-To: tarkhil@asteroid.svib.ru Subject: Troubles wit EliteGroup PII MB Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 11 Apr 1998 12:34:40 +0400 From: Alex Povolotsky Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello! Does anyone have any negative/positive experience with EliteGroup P6LX2-A motherboard? It _seems_ that FreeBSD 3.0 (980225 and 980409 builds) are VERY unstable on it. I have yet double-check everything, but maybe someone can point me to possible bug? Alex. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message