From owner-freebsd-arch Tue Jan 1 17:37: 5 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 9E96F37B41F for ; Tue, 1 Jan 2002 17:36:59 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id g021jZr03903; Tue, 1 Jan 2002 17:45:35 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200201020145.g021jZr03903@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Matthew Dillon Cc: Bruce Evans , arch@FreeBSD.ORG Subject: Re: When to use atomic_ functions? (was: 64 bit counters) In-reply-to: Your message of "Tue, 01 Jan 2002 15:49:20 PST." <200201012349.g01NnKA40071@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Jan 2002 17:45:35 -0800 From: Mike Smith 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 > > :On Tue, 1 Jan 2002, Mike Smith wrote: > :> > :> It's imperative to use atomic operations for counters on SMP systems. > : > :Not true. Atomic operations for counters are not needed on SMP systems > :in at least the following cases: > :- if there is a lock that prevents other processes from accessing the > : counter > :- if the counters are per-CPU. See previous mail by someone named msmith. 8) Sorry, I should have been more explicit, rather than assuming that the audience would read the implicit exclusion of alternatives into the above. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message