From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 20:00:43 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4E60106567A for ; Tue, 10 Jul 2012 20:00:43 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7535F8FC12 for ; Tue, 10 Jul 2012 20:00:43 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so877348pbb.13 for ; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=sFzfXNGHTOyWdblufI6dZqKaRUvciQng/I2K6CB6Ljk=; b=CVR2bK8JKx1QGtK650/1Ob2RIa4lZaEL9WdhoDYL0xcH2ImYkcgz+QYEKFlkg8Rc0j 8PFdZiPjNiwxp9PIPFCK5X9+TLRSON/1F0VcKZzjSPYzUhixNCpGwBqHAi3nJXpzoFCz Uaqn9seUwVqQioI3YtOiqPOxuuWoVrZ+YOSAzMorHR59kQc/Ar+6csLERAfM+bUfjrNp dlFatyu+WpT2KS2ExZ+60UFo3vv8U4FfwyVZ18gy2rt0zohmlQHxx0ESaryeq7E8AzCE b3POYtj/zgciaN/BjL9FURedKXsDHpwN9KnBtgpYQyLPeIxS02uUzep52bXsR4ZgVJiD n1Vg== MIME-Version: 1.0 Received: by 10.68.204.129 with SMTP id ky1mr73310577pbc.32.1341950443257; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) Received: by 10.68.226.7 with HTTP; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) In-Reply-To: <4FF9F3CF.6050608@fgznet.ch> References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> <4FF9F3CF.6050608@fgznet.ch> Date: Tue, 10 Jul 2012 15:00:43 -0500 Message-ID: From: Alan Cox To: Andreas Tobler Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ppc@freebsd.org, Justin Hibbits , Alan Cox Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 20:00:43 -0000 On Sun, Jul 8, 2012 at 3:55 PM, Andreas Tobler wrote: > On 07.07.12 19:39, Alan Cox wrote: > >> On 07/07/2012 09:20, Justin Hibbits wrote: >> >>> Looks like I spoke too soon about the pmap lock changes working on my >>> G4. After about 24 hours of uptime, it panicked with the following: >>> >>> _rw_wlock_hard: recursing but non-recursive rw pmap pv global >>> @ /home/chmeee/freebsd/src/sys/**powerpc/aim/mmu_oea.c:2301 >>> >>> I think the attached patch should fix it (Untested, except for >>> compiling). >>> >>> >> Ugh. Sorry. >> >> The attached patch eliminates the lock recursion. While I was doing >> that, I noticed that the pmap_ts_referenced() implementations on powerpc >> have the wrong return type. Oddly, the comments in mmu_if.h have the >> return type correct, but the code two or three lines later has it wrong. >> > > Fyi, I'm building world with the patch mentioned in this thread and the > kernel updated to 238258. (G5-SMP 32-bit) > > So far it looks promising. > > Before 238258 I got reliable machine locks/freeze w/o any idea what was > happening. > > If I reverted mmu_oea.c back to 238158, one before the commit from you > Alan, I was able to get a successful full world/kernel build cycle. > Yes, I confirmed that it booted, but I was not able to run a full > world/kernel cycle since I lost my GEOM_APM config ;). > > Anyway, as said, it looks promising and it will take some hours to > complete. > > Should I commit the patch? Alan