From owner-freebsd-alpha Thu Sep 5 9:27:41 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB7CA37B405 for ; Thu, 5 Sep 2002 09:27:36 -0700 (PDT) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84CC243E4A for ; Thu, 5 Sep 2002 09:27:36 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 311 invoked from network); 5 Sep 2002 16:27:34 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 5 Sep 2002 16:27:34 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g85GRYBv011534; Thu, 5 Sep 2002 12:27:34 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <15735.31557.85006.684144@grasshopper.cs.duke.edu> Date: Thu, 05 Sep 2002 12:27:34 -0400 (EDT) From: John Baldwin To: Andrew Gallatin Subject: Re: alpha performance on -current Cc: freebsd-alpha@FreeBSD.ORG, ticso@cicely.de Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org :q On 05-Sep-2002 Andrew Gallatin wrote: > > Bernd Walter writes: > > On Thu, Sep 05, 2002 at 10:43:27AM -0400, John Baldwin wrote: > > > > > > On 05-Sep-2002 Andrew Gallatin wrote: > > > > I'm using the appended diff, which I think is what you're suggesting: > > > > > > I think what he is really suggesting is to remove the mb's from all the > > > atomic_foo ops that don't have _acq or _rel in them. The _acq and _rel > > > versions should be wrappers that add mb's. > > > > Exactly. > > OK, I'm bound to make a hash of things. Can you show me what you > mean? Here's an example from just one of the atomic ops: --- atomic.h 17 May 2002 05:45:39 -0000 1.14 +++ atomic.h 5 Sep 2002 16:24:28 -0000 @@ -51,16 +51,15 @@ u_int32_t temp; __asm __volatile ( "1:\tldl_l %0, %2\n\t" /* load old value */ "bis %0, %3, %0\n\t" /* calculate new value */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" : "=&r" (temp), "=m" (*p) : "m" (*p), "r" (v) : "memory"); } Thus, the only atomic ops that would have any barriers in them are the _acq and _rel variants. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message