From owner-freebsd-net@FreeBSD.ORG Tue Mar 16 08:21:12 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E8AA16A4CE; Tue, 16 Mar 2004 08:21:12 -0800 (PST) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDEEC43D1D; Tue, 16 Mar 2004 08:21:11 -0800 (PST) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.11/8.12.11) with ESMTP id i2GGL8h4064428; Tue, 16 Mar 2004 11:21:08 -0500 (EST) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.11/8.12.11/Submit) id i2GGL5CT064427; Tue, 16 Mar 2004 11:21:05 -0500 (EST) (envelope-from barney) Date: Tue, 16 Mar 2004 11:21:05 -0500 From: Barney Wolff To: Julian Elischer Message-ID: <20040316162105.GA62449@pit.databus.com> References: <20040316022337.GA44429@ns1.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Scanned-By: MIMEDefang 2.39 cc: current@freebsd.org cc: net@freebsd.org Subject: Re: Byte counters reset at ~4GB X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 16:21:12 -0000 On Tue, Mar 16, 2004 at 12:36:21AM -0800, Julian Elischer wrote: > > I believe that the expense is that acting on the counters can not be > both cheap and atomic at the same time.. > I think we need a whole pile of atomic primatives in addition to what we > already have. including an atomic reference conting method and > atomic statistics methods. At the risk of seeming foolish, let me ask if atomicity is really necessary for these counters. Yes, if there can ever be multiple writers, of course. But if the problem is only that a reader might get an answer wrong by 4e9, most readers (eg, netstat) probably shouldn't care, and those that do could sanity-check the result and repeat the read if necessary. What am I missing here? -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.