From owner-freebsd-arch Sun Jan 20 15:59:49 2002 Delivered-To: freebsd-arch@freebsd.org Received: from prg.traveller.cz (prg.traveller.cz [193.85.2.77]) by hub.freebsd.org (Postfix) with ESMTP id 8144A37B417 for ; Sun, 20 Jan 2002 15:59:42 -0800 (PST) Received: from prg.traveller.cz (localhost [127.0.0.1]) by prg.traveller.cz (8.12.1[KQ-CZ](1)/8.12.1/pukvis) with ESMTP id g0KNxfg8095897; Mon, 21 Jan 2002 00:59:41 +0100 (CET) Received: from localhost (mime@localhost) by prg.traveller.cz (8.12.1[KQ-CZ](1)/pukvis) with ESMTP id g0KNxftE095894; Mon, 21 Jan 2002 00:59:41 +0100 (CET) Date: Mon, 21 Jan 2002 00:59:41 +0100 (CET) From: Michal Mertl To: Garrett Wollman Cc: arch@FreeBSD.ORG Subject: Re: 64 bit counters again In-Reply-To: <200201202125.g0KLPqf31593@khavrinen.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Sun, 20 Jan 2002, Garrett Wollman wrote: > I hope you'll forgive me for reopening this up to -arch again.... > > < said: > > > But compare and exchange or conditional move insns should be there. > > And because the platform is fully 64 bit AFAIK I'd expect at least > > 64 bit variants of them. The cache coherency problem is also > > unrelated - it's there whatever size you have. > > The ultimate upshot of this is that it does not make sense to expose > low-level primitives (such as compare-exchange or LL/SC) directly in > the API. This is because each processor architecture will have its It isn't exposed in the API as far as I see. > own requirements for coherency, in some cases requiring specialized > instructions which a compiler would not normally generate, and often > requiring memory barriers inside the spin loop. > > However, we can easily define a set of basic operations which every > architecture we currently support can implement reliably and > coherently without locking, including incrementing counters and > updating some kinds of linked lists. (This has been proven both > formally and by construction; see a recent Algorithms textbook.) Seems so. -- Michal Mertl mime@traveller.cz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message