From owner-freebsd-current@FreeBSD.ORG Sat Jul 29 21:15:36 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 F2C7E16A4DE for ; Sat, 29 Jul 2006 21:15:36 +0000 (UTC) (envelope-from b.candler@pobox.com) Received: from rune.pobox.com (rune.pobox.com [208.210.124.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9050F43D45 for ; Sat, 29 Jul 2006 21:15:36 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from rune (localhost [127.0.0.1]) by rune.pobox.com (Postfix) with ESMTP id 89F197B936; Sat, 29 Jul 2006 17:15:57 -0400 (EDT) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rune.sasl.smtp.pobox.com (Postfix) with ESMTP id 1E1D878904; Sat, 29 Jul 2006 17:15:54 -0400 (EDT) Received: from brian by mappit.local.linnet.org with local (Exim 4.61 (FreeBSD)) (envelope-from ) id 1G6w9j-000D6J-9y; Sat, 29 Jul 2006 22:15:31 +0100 Date: Sat, 29 Jul 2006 22:15:31 +0100 From: Brian Candler To: Peter Jeremy Message-ID: <20060729211530.GA50342@uk.tiscali.com> References: <200607251254.k6PCsBef092737@lurza.secnetix.de> <200607271058.13055.jhb@freebsd.org> <20060728121525.GA44917@uk.tiscali.com> <200607280928.36573.jhb@freebsd.org> <20060728134701.GA45273@uk.tiscali.com> <20060728210154.GC748@turion.vk2pj.dyndns.org> <1154189612.1565.10.camel@genius.i.cz> <20060729205655.GE748@turion.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060729205655.GE748@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.1i Cc: Michal Mertl , freebsd-current@freebsd.org 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: Sat, 29 Jul 2006 21:15:37 -0000 On Sun, Jul 30, 2006 at 06:56:55AM +1000, Peter Jeremy wrote: > On Sat, 2006-Jul-29 18:13:32 +0200, Michal Mertl wrote: > >#define PCPU_LAZY_INC(var) (++*PCPU_PTR(var)) > > I missed that. > > >and function vcnt from sys/vm/vm_meter.c > > vcnt() accumulates multiple 32-bit counters into a 32-bit result. Getting > a 64-bit result means additionally tracking overflows in each counter. But if you have per-CPU counters, there's no problem with accumulating 64-bit values in the first place. So in the above macro I don't see why 'var' can't be a pointer to a uint64_t, with relevant minor changes to vcnt() of course. Regards, Brian.