From owner-freebsd-arch Wed Jan 2 16:13: 0 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 8524937B41E; Wed, 2 Jan 2002 16:12:56 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g030Cgp60752; Wed, 2 Jan 2002 16:12:42 -0800 (PST) (envelope-from dillon) Date: Wed, 2 Jan 2002 16:12:42 -0800 (PST) From: Matthew Dillon Message-Id: <200201030012.g030Cgp60752@apollo.backplane.com> To: Alfred Perlstein Cc: John Baldwin , arch@FreeBSD.ORG, Bernd Walter , Mike Smith , Bruce Evans , Michal Mertl , Peter Jeremy Subject: Re: When to use atomic_ functions? (was: 64 bit counters) References: <200201030002.g0302Eo60575@apollo.backplane.com> <20020102180734.A82406@elvis.mu.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> Maybe we are going about this all wrong. If a particular interface :> counter can only be modified from the device interrupt, or only be :> modified while holding the appropriate mutex, do we need any locking :> at all? : :Yes against the collector unless the collector is run periodically :on each cpu to collect the stats. : :-- :-Alfred Perlstein [alfred@freebsd.org] If we standardize the mutex used by interface device-driver interrupts (if it isn't already done), the collector could obtain the mutex when reading the counter, yes? -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message