From owner-freebsd-current@FreeBSD.ORG Sun Jul 23 18:58:05 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E92F16A556 for ; Sun, 23 Jul 2006 18:58:05 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.FreeBSD.org (Postfix) with SMTP id 8768243D49 for ; Sun, 23 Jul 2006 18:58:01 +0000 (GMT) (envelope-from sthaug@nethelp.no) Received: (qmail 49137 invoked from network); 23 Jul 2006 18:57:59 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 23 Jul 2006 18:57:59 -0000 Date: Sun, 23 Jul 2006 20:57:59 +0200 (CEST) Message-Id: <20060723.205759.74723866.sthaug@nethelp.no> To: lists@wm-access.no From: sthaug@nethelp.no In-Reply-To: <44C3B674.3040804@wm-access.no> References: <200607191315.k6JDFpvM048354@lurza.secnetix.de> <20060720.093457.1661914908.imp@bsdimp.com> <44C3B674.3040804@wm-access.no> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, imp@bsdimp.com Subject: Re: vmstat's entries type X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2006 18:58:05 -0000 > > One approach that we could use for 64-bit counters would be to just > > use 32-bits one, and poll them for overflow and bump an overflow > > count. This assumes that the 32-bit counters overflow much less often > > than the polling interval, and easily triples the amount of storage > > for each of them... It is ugly :-( > > > > What's wrong with the add+adc (asm) approach found on any i386? Presumably the fact that add + adc isn't an atomic operation. So if you want to guarantee 64 bit consistency, you need locking or similar. Steinar Haug, Nethelp consulting, sthaug@nethelp.no