From owner-freebsd-current@FreeBSD.ORG Wed Apr 9 10:28:22 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DC9E37B401 for ; Wed, 9 Apr 2003 10:28:22 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A5E543F3F for ; Wed, 9 Apr 2003 10:28:21 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.9/8.12.9) with ESMTP id h39HSGMS005128 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 9 Apr 2003 13:28:16 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h39HSBc45006; Wed, 9 Apr 2003 13:28:11 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16020.22571.349778.196862@grasshopper.cs.duke.edu> Date: Wed, 9 Apr 2003 13:28:11 -0400 (EDT) To: Nate Lawson In-Reply-To: References: <16013.49267.867140.38329@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: jroberson@chesapeake.net cc: current@freebsd.org Subject: Re: mbuf LOR X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 17:28:22 -0000 Nate Lawson writes: > On Fri, 4 Apr 2003, Andrew Gallatin wrote: > > The following patch boots & passed the basic 'make -j16 buildworld' > > test on x86 SMP. As I outlined before, I'm not certain if it is safe > > on all platforms. > > > > Index: vm/uma_core.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/vm/uma_core.c,v > > retrieving revision 1.51 > > diff -u -r1.51 uma_core.c > > --- vm/uma_core.c 26 Mar 2003 18:44:53 -0000 1.51 > > +++ vm/uma_core.c 4 Apr 2003 15:11:34 -0000 > > @@ -703,10 +703,15 @@ > > wait &= ~M_ZERO; > > > > if (booted || (zone->uz_flags & UMA_ZFLAG_PRIVALLOC)) { > > - mtx_lock(&Giant); > > - mem = zone->uz_allocf(zone, > > - zone->uz_ppera * UMA_SLAB_SIZE, &flags, wait); > > - mtx_unlock(&Giant); > > + if ((wait & M_NOWAIT) == 0) { > > + mtx_lock(&Giant); > > + mem = zone->uz_allocf(zone, > > + zone->uz_ppera * UMA_SLAB_SIZE, &flags, wait); > > + mtx_unlock(&Giant); > > + } else { > > + mem = zone->uz_allocf(zone, > > + zone->uz_ppera * UMA_SLAB_SIZE, &flags, wait); > > + } > > if (mem == NULL) { > > ZONE_LOCK(zone); > > return (NULL); > > I have been running with this patch for days with MPSAFE and it works > fine. Will you commit it at some point? Can the non-i386 platform heads > chime in? I'd really prefer that Jeff reviewed it, as I'm not 100% familiar with the code. I seem to remember that he's out of town for a week. Drew