From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id B027A2F319 for ; Wed, 8 Nov 2000 18:43:48 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eA8NhmI24998 for axp-list@listman.redhat.com; Wed, 8 Nov 2000 18:43:48 -0500 Received: from toronto.sigma6.com (toronto.sigma6.com [204.176.48.147]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eA8NhlD24994 for ; Wed, 8 Nov 2000 18:43:48 -0500 Received: from appnet.com (IDENT:jsturm@localhost.localdomain [127.0.0.1]) by toronto.sigma6.com (8.9.3/8.9.3) with ESMTP id SAA09060 for ; Wed, 8 Nov 2000 18:53:44 -0500 Message-ID: <3A09E787.838B6BC9@appnet.com> Date: Wed, 08 Nov 2000 18:53:43 -0500 From: Jeff Sturm Organization: Commerce One X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: [Fwd: Alpha SMP problem] References: <3A095A5D.A5C7900D@scs.ch> <3A09B857.79DB9BB2@appnet.com> <20001108141543.A27935@twiddle.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors Richard Henderson wrote: > I did blame his code until I fixed it and it still failed. > The following is actually the best fix; nothing needs to be > made volatile, just add write-memory-barriers appropriately. Richard is right, it works without volatile, because the compiler cannot recognize that the call to Th_Delay() has no side effects. Replace it with a macro or asm and the load can get hoisted out of the loop (if the compiler is smart enough... it turns out that gcc won't make this optimization if the address of mem is taken at all). What is the advtange of wmb vs. mb? -- Jeff Sturm jeff.sturm@commerceone.com