From owner-freebsd-stable@FreeBSD.ORG Sun Jul 6 20:06:42 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD3EC37B401 for ; Sun, 6 Jul 2003 20:06:42 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8302043FAF for ; Sun, 6 Jul 2003 20:06:41 -0700 (PDT) (envelope-from freebsd-stable-local@be-well.no-ip.com) Received: from be-well.ilk.org (be-well.no-ip.com[24.147.188.198]) by comcast.net (sccrmhc13) with ESMTP id <20030707030638016000ritke>; Mon, 7 Jul 2003 03:06:38 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198] (may be forged)) by be-well.ilk.org (8.12.9/8.12.9) with ESMTP id h6736ZpS026917 for ; Sun, 6 Jul 2003 23:06:35 -0400 (EDT) (envelope-from freebsd-stable-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.9/8.12.6/Submit) id h6736Z7W026914; Sun, 6 Jul 2003 23:06:35 -0400 (EDT) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-stable-local@be-well.ilk.org using -f Sender: lowell@be-well.no-ip.com To: stable@freebsd.org References: <200307051728.24681.me@farid-hajji.de> <44brw8g26e.fsf@be-well.ilk.org> <200307060029.00866.me@farid-hajji.de> <3F07576F.4030105@mac.com> <20030706213540.GU430@gsmx07.alcatel.com.au> <20030706215545.1c29c5ed.cpressey@catseye.mb.ca> From: Lowell Gilbert Date: 06 Jul 2003 23:06:35 -0400 In-Reply-To: <20030706215545.1c29c5ed.cpressey@catseye.mb.ca> Message-ID: <44u19zxcg4.fsf@be-well.ilk.org> Lines: 14 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Weird vmstat -s stats X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 03:06:43 -0000 Chris Pressey writes: > 'Scuse me if I'm out of my depth here, but wouldn't the atomic 64-bit > update only have to be done when the lower 32 bits were about to wrap > (which would be relatively infrequent)? Unfortunately, that doesn't quite work. It opens up a race condition where the counter wasn't about to wrap when you do the check, but has been advanced again when you do the increment. > The check to see if the lower 32 bits were about to wrap would be > relatively cheap, too, I'd think. Absolutely. The problem is just that the check itself is not atomic.