From owner-freebsd-current Sun Feb 17 12:25:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id C46D637B416 for ; Sun, 17 Feb 2002 12:25:12 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id g1HKM7N05783; Sun, 17 Feb 2002 21:22:07 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Matthew Dillon Cc: Bruce Evans , freebsd-current@FreeBSD.ORG Subject: Re: 'microuptime() went backwards ...' using ACPI timer. Shouldn't that be impossible? In-Reply-To: Your message of "Sun, 17 Feb 2002 10:46:12 PST." <200202171846.g1HIkCQ71367@apollo.backplane.com> Date: Sun, 17 Feb 2002 21:22:07 +0100 Message-ID: <5781.1013977327@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200202171846.g1HIkCQ71367@apollo.backplane.com>, Matthew Dillon wri tes: >:I just wrote the following fix for some of the overflow problems. > > I don't understand how this code is supposed to handle overflows. > You seem only to be checking to see if the master timecounter has > changed to a different type. Bruce's patch amounts to a retry if the current timecounter was updated while we were calculating time. It is a bit more defensive than it needs to be and generally pessimizes the timecounters elegant lockless design a fair bit, but it is still much better than slamming a mutex around the entire clock code. If this patch cures the PIIX problem, something I'm not at all convinced about, it should go in, if not only the comment should go in. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message