From owner-freebsd-sparc64@FreeBSD.ORG Fri Sep 2 15:32:12 2011 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4961106564A for ; Fri, 2 Sep 2011 15:32:12 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 606828FC0A for ; Fri, 2 Sep 2011 15:32:12 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p82FW6MU051178; Fri, 2 Sep 2011 17:32:06 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p82FW6Tb051177; Fri, 2 Sep 2011 17:32:06 +0200 (CEST) (envelope-from marius) Date: Fri, 2 Sep 2011 17:32:06 +0200 From: Marius Strobl To: Peter Jeremy Message-ID: <20110902153206.GR40781@alchemy.franken.de> References: <20110526234728.GA69750@server.vk2pj.dyndns.org> <20110527120659.GA78000@alchemy.franken.de> <20110601231237.GA5267@server.vk2pj.dyndns.org> <20110608224801.GB35494@alchemy.franken.de> <20110613235144.GA12470@server.vk2pj.dyndns.org> <20110813143807.GY48988@alchemy.franken.de> <20110816214820.GA35017@server.vk2pj.dyndns.org> <20110817094541.GJ48988@alchemy.franken.de> <20110830152725.GA28552@alchemy.franken.de> <20110831212458.GA25926@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110831212458.GA25926@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: 'make -j16 universe' gives SIReset X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 15:32:12 -0000 On Thu, Sep 01, 2011 at 07:24:58AM +1000, Peter Jeremy wrote: > On 2011-Aug-30 17:27:25 +0200, Marius Strobl wrote: > >Regarding the problem with the userland mutex code could you please try > >whether the following patch makes a difference? Given that the previous > >version of the above one as a side-effect made that problem harder to > >trigger it's probably a good idea to test the second patch separately. > >http://people.freebsd.org/~marius/sparc64_casuword_membar.diff > > As far as I can tell, that applies to /usr/src/sys/sparc64/sparc64/support.S > and only affects the kernel. If so, then with it applied, the stress > tests ran for about 5?hrs and then a thr1 process got wedged in urdlck. > Yes, the patch is a workaround for the fact that there are no acquire and release versions of casuword*(9), which seems to be part of the problem given that adding a memory barrier makes it considerably harder to trigger the problem and given that the code appears to otherwise work fine on at least x86 (where unlike sparc64 memory barriers are seldom necessary). The userland part of the userland mutex code already uses the acquire and release variants of atomic operations. Unfortunately, that code is rather complex, at least for me, so it's hard to judge whether parts that look suspicious are actually okay or are subject to races. Marius