From owner-freebsd-current@FreeBSD.ORG Sun Jul 30 09:07:50 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 E1BBB16A4DA for ; Sun, 30 Jul 2006 09:07:50 +0000 (UTC) (envelope-from mime@traveller.cz) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4205D43D4C for ; Sun, 30 Jul 2006 09:07:49 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.6/8.13.6) with ESMTP id k6U97l4m080418 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 30 Jul 2006 11:07:47 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: Paul Allen In-Reply-To: <20060730005342.GJ12597@groat.ugcs.caltech.edu> References: <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> <20060729211530.GA50342@uk.tiscali.com> <1154212340.3609.18.camel@genius.i.cz> <20060729230214.GI12597@groat.ugcs.caltech.edu> <1154216319.23616.23.camel@genius.i.cz> <1154217036.23616.28.camel@genius.i.cz> <20060730005342.GJ12597@groat.ugcs.caltech.edu> Content-Type: text/plain Date: Sun, 30 Jul 2006 11:07:31 +0200 Message-Id: <1154250451.23616.37.camel@genius.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Peter Jeremy , freebsd-current@freebsd.org, Brian Candler 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, 30 Jul 2006 09:07:51 -0000 Paul Allen wrote: > >From Michal Mertl , Sun, Jul 30, 2006 at 01:50:36AM +0200: > > Michal Mertl wrote: > > > Paul Allen wrote: > > > > Surely all you need to do is a cheap crit_enter,crit_exit > > > > while updating the 64-bit per cpu counters. and on > > > > a 64-bit arch you skip the crit_enter,crit_exit. > > > > > > Critical_enter/exit seem to be quite lightweight (single > > > read/modify/write of a variable). > > > > One more question. Why do you say that crit_* can be avoided on 64-bit > > arch? If the reason was that "increment of a 64 bit number is one > > operation there" it probably is not true - as somebody already stated, > > some instruction sets don't allow atomic increment of a memory location. > > > > Michal > > Which FreeBSD tier-I 64b arch do you have in mind... I was referring to what Peter Jeremy said earlier in this thread: > RISC architectures usually only have TAS lock primitives (because "inc > mem" doesn't exist) and so require a spinlock to perform an atomic > update. I don't know anything that low level about any platform but i386. Michal