Date: Tue, 30 Apr 2013 16:33:11 +0200 From: Olivier Houchard <cognet@ci0.org> To: Andrew Turner <andrew@fubar.geek.nz> Cc: freebsd-arm@freebsd.org Subject: Re: RFC: Patches with AXP support and pmap&smp fixes. Message-ID: <20130430143311.GA71966@ci0.org> In-Reply-To: <20130430142701.5bbfec2b@bender.lan> References: <517E8610.5050204@semihalf.com> <20130430142701.5bbfec2b@bender.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 30, 2013 at 02:27:01PM +0100, Andrew Turner wrote: > On Mon, 29 Apr 2013 16:39:12 +0200 > Grzegorz Bernacki <gjb@semihalf.com> wrote: > > > Hi, > > > > I am going to submit some changes related to Armada XP support and > > some general ARM fixes. You can find them at: > > http://people.freebsd.org/~gber/armada > > > > It would be good if someone could review changes in generic ARM code > > i.e.: 1) > > http://people.freebsd.org/~gber/armada/0004-arm-smp-Fix-AP-processors-initialization-procedure.patch > > > > This patch fixes race condition in pcpu_init function. pcpu_init > > performs operation on signly-linked tail queue and the queue can be > > corrupted by secondary cpus initialization. > > >From this patch I can infer you have used FreeBSD ARM with SMP. Have > you tried with WITNESS enabled? If not can you try? > > There is a known issue where accessing curthread is non-atomic when it > is required to be. In it's current state mutexes may fail when they are > unlocked. Olivier Houchard had a patch a few months ago to rework how > the data is stored. My understanding is this helped but I have not seen > or tried the patch. > > Olivier, is the above correct, and are we able to get this work into > the tree so we can work on making SMP stable? > > Andrew Hi Andrew, That's true, the patch helped a lot, by storing curthread and curpcb on the stack, and disabling interrupts while accessing less used pcpu entries. However something was still wrong, after maybe between 30 minutes and 1 hour of building port, I would get a random panic, usually from the VM, that I was unable to diagnose so far. I can dust of the patch, and share it anyway, even if it's still more a proof of concept than anything else, if somebody is willing to work with me on the remaining issues. Also, it was my understanding that Semihalf also had an alternative patch to solve the very same issue, did I get that wrong ? Regards, Olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130430143311.GA71966>