From owner-freebsd-arch@FreeBSD.ORG Thu Dec 17 08:28:12 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1509106568B; Thu, 17 Dec 2009 08:28:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 3F8638FC12; Thu, 17 Dec 2009 08:28:11 +0000 (UTC) Received: from c220-239-235-116.carlnfd3.nsw.optusnet.com.au (c220-239-235-116.carlnfd3.nsw.optusnet.com.au [220.239.235.116]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id nBH8S8sx014527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Dec 2009 19:28:09 +1100 Date: Thu, 17 Dec 2009 19:28:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Bruce Evans In-Reply-To: <20091217181553.Q36492@delplex.bde.org> Message-ID: <20091217191535.U36525@delplex.bde.org> References: <20091215103759.P97203@beagle.kn.op.dlr.de> <200912150812.35521.jhb@freebsd.org> <20091215183859.S53283@beagle.kn.op.dlr.de> <200912151313.28326.jhb@freebsd.org> <20091217021211.O35780@delplex.bde.org> <20091217181553.Q36492@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Harti Brandt , John Baldwin , freebsd-arch@FreeBSD.org Subject: Re: network statistics in SMP X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 08:28:12 -0000 On Thu, 17 Dec 2009, Bruce Evans wrote: > On Thu, 17 Dec 2009, Bruce Evans wrote: > >> ... > Actually3, the generation count can be per-CPU and accessed without atomic > ops (provided reads of it on other CPUs return a consistent possibly-stale > value). > >> Simple version: > > Better version: > ... Duh, this is far too complicated and bloated. Counters can be their own generation counts -- you just read them again to see if they are quiescent. A heavyweight sync before each of the (sets of) reads is still necessary. Self-generation counters give a separate generation counter for each normal counter, so quiescence can be easily be checked for and/or enforced per-counter. Bruce