From owner-freebsd-current@FreeBSD.ORG Tue Jul 29 19:14:54 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 71B0937B401; Tue, 29 Jul 2003 19:14:54 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72CCF43FBD; Tue, 29 Jul 2003 19:14:53 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6TMJSaA054772; Tue, 29 Jul 2003 22:19:29 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6TMJSsl054771; Tue, 29 Jul 2003 22:19:28 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Tue, 29 Jul 2003 22:19:28 +0000 From: Bosko Milekic To: Tor.Egge@cvsup.no.freebsd.org Message-ID: <20030729221928.GA54757@technokratis.com> References: <88569.1059513090@critter.freebsd.dk> <20030730012321I.tegge@cvsup.no.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030730012321I.tegge@cvsup.no.freebsd.org> User-Agent: Mutt/1.4.1i cc: phk@phk.freebsd.dk cc: jeffr@freebsd.org cc: current@freebsd.org Subject: Re: HEADSUP: UMA not reentrant / possible memory leak 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, 30 Jul 2003 02:14:54 -0000 On Wed, Jul 30, 2003 at 01:23:21AM +0000, Tor.Egge@cvsup.no.freebsd.org wrote: > > The indication of this is that the g_bio zone does not return to > > zero USED as it should. > > It looks like z->uz_cachefree is slightly out of date (updated in > zone_timout() every 20th second) and often too low (not taking the > z->uz_full_bucket list into account). > > The enclosed patch recalculates the number of free elements on the > buckets instead of using z->uz_cachefree. > > - Tor Egge > We took this into account when we did the comparison. We know that uz_cachefree is only a snapshot count; but Poul-Henning`s patch clearly illustrates a frequent fluctuation in the free zone value but where the actual number of allocated g_bio zone elements stays stable at 0, for example. The fact that the problem is solved when buckets are disabled also is indicative that there is a clear reentrancy problems somewhere. There may also be some bucket leakage (although I have not yet confirmed this) as well. -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/