From owner-freebsd-smp Mon Nov 29 3:33:47 1999 Delivered-To: freebsd-smp@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id DC16515157 for ; Mon, 29 Nov 1999 03:33:44 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id MAA20995 for ; Mon, 29 Nov 1999 12:33:37 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: smp@freebsd.org Subject: SMP/PIIX "calcru: negative time" Date: Mon, 29 Nov 1999 12:33:36 +0100 Message-ID: <20993.943875216@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This patch should hopefully fix a lot of the "calcru: negative time" warnings on SMP systems. Intel forgot that reading an asynchronous counter needs a latch to get reliable readings: There is about 4% risk of reading a bogus value from the PIIX counter. I have also added some checks to try to avoid using bogus timestamps should they occur again/still. Please let me know if you see either of the "calcru: negative time" or the new ""microuptime() went backwards ..." warnings after this change. Please include your boot dmesg and output from sysctl -a in your email. Poul-Henning ------- Forwarded Message Message-Id: <199911291127.DAA37357@freefall.freebsd.org> From: Poul-Henning Kamp Date: Mon, 29 Nov 1999 03:27:42 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/i386 mp_clock.c Sender: owner-cvs-committers@FreeBSD.org Precedence: bulk X-UIDL: c7ea5d26ec5590356755c8c7a3926448 phk 1999/11/29 03:27:42 PST Modified files: sys/i386/i386 mp_clock.c Log: How hard can it be to implement a 24bit counter in hardware ? Make sure we read a likely value from the PIIX timecounter. This should fix a large fraction of the "calcru: negative time" warnings produced by SMP machines. Another hole in one by: bde Didn't belive Bruce: phk Revision Changes Path 1.4 +34 -2 src/sys/i386/i386/mp_clock.c ------- End of Forwarded Message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message