Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2010 14:32:13 -0500
From:      Nathan Whitehorn <nwhitehorn@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, Matthew D Fleming <mdf@freebsd.org>, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r212572 - in head/sys: dev/cxgb kern sys vm
Message-ID:  <20100913143213.420ec5c6@anacreon.physics.wisc.edu>
In-Reply-To: <201009131518.38829.jhb@freebsd.org>
References:  <201009131848.o8DImNU6024992@svn.freebsd.org> <201009131518.38829.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 Sep 2010 15:18:38 -0400
John Baldwin <jhb@freebsd.org> wrote:

> On Monday, September 13, 2010 2:48:23 pm Matthew D Fleming wrote:
> > Author: mdf
> > Date: Mon Sep 13 18:48:23 2010
> > New Revision: 212572
> > URL: http://svn.freebsd.org/changeset/base/212572
> > 
> > Log:
> >   Revert r212370, as it causes a LOR on powerpc.  powerpc does a few
> >   unexpected things in copyout(9) and so wiring the user buffer is
> > not sufficient to perform a copyout(9) while holding a random mutex.
> >   
> >   Requested by: nwhitehorn
> 
> Hmmm, that is going to break several other sysctls as well then.
> Many sysctls use sysctl_wire_old_buffer() explicitly so that they can
> then call SYSCTL_OUT() without dropping a lock.  The pcblist sysctls
> do this for example I think.  In general code in the kernel assumes
> that copyout(9) to/from a wired buffer is safe while holding mutexes
> or rwlocks.
> 

Yes. The issue here is that powerpc64 copyin/out() needs to acquire
the PMAP lock, so holding normal mutexes is fine, but calling
into copyout() with non-sleepable locks like this code did is
not. Matthew and I are working on a better solution that fixes this on
the powerpc copyout() side, but it is tricky for a variety of reasons
and will take a little while. In the meantime, this keeps powerpc64
systems bootable.
-Nathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100913143213.420ec5c6>