From owner-cvs-all Wed Dec 13 14:52:36 2000 From owner-cvs-all@FreeBSD.ORG Wed Dec 13 14:52:30 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from io.yi.org (unknown [24.70.218.157]) by hub.freebsd.org (Postfix) with ESMTP id 64AAF37B402; Wed, 13 Dec 2000 14:52:30 -0800 (PST) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id 9F480BA7D; Wed, 13 Dec 2000 14:52:20 -0800 (PST) X-Mailer: exmh version 2.1.1 10/15/1999 To: Julian Elischer Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/sys mbuf.h In-Reply-To: Message from Julian Elischer of "Wed, 13 Dec 2000 13:45:11 PST." <3A37EDE7.4E2A2F52@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 13 Dec 2000 14:52:20 -0800 From: Jake Burkholder Message-Id: <20001213225220.9F480BA7D@io.yi.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > John Baldwin wrote: > > > > On 13-Dec-00 Bosko Milekic wrote: > > > bmilekic 2000/12/12 21:13:03 PST > > > > > > Modified files: > > > sys/sys mbuf.h > > > Log: > > > Eliminate a race in MEXTFREE(). The reference counter decrement and test > > > was not atomic. We now make sure that we free the ext buf if the reference > > > count is about to reach 0 but also make sure that nobody else has done it > > > before us. > > > > > > While I'm here, change refcnt to u_int (from long). This fixes a compiler > > > warning regarding use of atomic_cmpset_long on i386. > > > > If you are using atomic_cmpset_long, then use u_long for the refcount instead > > of u_int please. Eitehr that, or use atomic_cmpset_int. > > looking at the alpha code it looks like possibly cmpset instructions have to be > synthesised on alpha and might be quite expensive.. what are the facts in > this regard? All atomic operations must be synthesized on the alpha. There are no atomic operations, only locked load and conditional stored. However, these allow great flexibility in synthesizing more complex operations. Being a risc architecture the number of instructions executed is generally unimportant. > > > > > -- > > > > John Baldwin -- http://www.FreeBSD.org/~jhb/ > > PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc > > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > > -- > __--_|\ Julian Elischer > / \ julian@elischer.org > ( OZ ) World tour 2000 > ---> X_.---._/ presently in: Budapest > v > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message