From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 17 09:45:46 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 E6B101065670 for ; Wed, 17 Aug 2011 09:45:46 +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 61D1E8FC19 for ; Wed, 17 Aug 2011 09:45:45 +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 p7H9jfPw025725; Wed, 17 Aug 2011 11:45:41 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p7H9jfr6025724; Wed, 17 Aug 2011 11:45:41 +0200 (CEST) (envelope-from marius) Date: Wed, 17 Aug 2011 11:45:41 +0200 From: Marius Strobl To: Peter Jeremy Message-ID: <20110817094541.GJ48988@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110816214820.GA35017@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: Wed, 17 Aug 2011 09:45:47 -0000 On Wed, Aug 17, 2011 at 07:48:20AM +1000, Peter Jeremy wrote: > On 2011-Aug-13 16:38:07 +0200, Marius Strobl wrote: > >Could you please give the following patch with SCHED_4BSD (cpu_switch() > >still is missing support for SCHED_ULE) with something like -j128 > >buildworlds a try on your V890? > >http://people.freebsd.org/~marius/sparc64_replace_sched_lock_w_atomic.diff > > Getting better but still not perfect. It survived a couple of -j128 > buildworlds with another six -j16 buildworlds running in parallel. Thanks! > > But it still has the same issue pho's stress test - a thr1 process is > blocked in urdlck. The improvement is that there's only one stuck > process and it took 7? hrs at INCARNATIONS=150 instead of 1-2 hours. > (And it runs out of witness locks). > Well, the sole purpose of that patch is to get rid of the MD sched_lock usage in order to be able to add support for SCHED_ULE in a next step. It's not obvious why this should have an impact on the problem with userland mutex code. In fact using sched_lock provided more protection than solving this via atomic operations, which should still be sufficient for what we need to guarantee though. If at all I'd expect the patch to create problems in case I've overlooked something, not to solve any :) If it indeed has a positive impact on the the userland mutex problem then my best guess is that this is a side-effect of the memory barriers the patch adds to the context switching. That would indicate that the cause of the problem in fact are missing memory barriers in the userland mutex code, which IMO is one of the suspicious things regarding that code. Marius