From owner-freebsd-current@FreeBSD.ORG Fri Oct 14 16:20:41 2005 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 11F1D16A41F for ; Fri, 14 Oct 2005 16:20:41 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE34343D5C for ; Fri, 14 Oct 2005 16:20:38 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id j9EGKO5i090379; Fri, 14 Oct 2005 11:20:24 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <434FDAB2.7040402@centtech.com> Date: Fri, 14 Oct 2005 11:20:02 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050914 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <200510131412.23525.max@love2party.net> <20051013181026.GB27418@odin.ac.hmc.edu> <20051014091004.GC18513@uk.tiscali.com> <20051014.085816.104604949.imp@bsdimp.com> In-Reply-To: <20051014.085816.104604949.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1134/Fri Oct 14 03:07:44 2005 on mh2.centtech.com X-Virus-Status: Clean Cc: max@love2party.net, freebsd-current@freebsd.org, B.Candler@pobox.com Subject: Re: ufsstat - testers / feedback wanted! 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: Fri, 14 Oct 2005 16:20:41 -0000 M. Warner Losh wrote: > In message: <20051014091004.GC18513@uk.tiscali.com> > Brian Candler writes: > : On Thu, Oct 13, 2005 at 11:10:26AM -0700, Brooks Davis wrote: > : > > I don't think you can measure one single interger (or 64bit) increase in face > : > > of a operation that has to access backing store. Even if there is a > : > > performance hit, you don't have to build your kernel with the option enabled. > : > > : > The one thing I'd be worried about here is that 64bit updates are > : > expensive on 32bit machines if you want them to be atomic. Relative to > : > backing store they probably still don't matter, but the might be > : > noticable. > : > : I'd be grateful if you could clarify that point for me. Are you saying that > : if I write > : > : long long foo; > : ... > : foo++; > : > : then the C compiler generates code for 'foo++' which is not thread-safe? > : (And therefore I would have to protect it with a mutex or critical section) > : > : Or are you saying that the C compiler inserts its own code around foo++ to > : turn it into a critical section, and therefore runs less efficiently than > : you'd expect? > > You have to protect this thread-unsafe operation yourself. For statistics gathering purposes though, should I worry about this, or go for 'fast and imperfect' instead of 'perfect and slow'? With filesystems, I think it's more important to leave performance high and get a notion of the statistics, rather than impact performance for perfect stats (that you may only look at occasionally anyhow). Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------