From owner-freebsd-current@FreeBSD.ORG Wed Jul 30 06:07:15 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 6F12437B404 for ; Wed, 30 Jul 2003 06:07:15 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 606CF43FBF for ; Wed, 30 Jul 2003 06:07:14 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6U9BmaA057291; Wed, 30 Jul 2003 09:11:48 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6U9BlAZ057290; Wed, 30 Jul 2003 09:11:48 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Wed, 30 Jul 2003 09:11:47 +0000 From: Bosko Milekic To: Jeff Roberson Message-ID: <20030730091147.GA57227@technokratis.com> References: <20030730012321I.tegge@cvsup.no.freebsd.org> <20030729234117.U14210-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030729234117.U14210-100000@mail.chesapeake.net> User-Agent: Mutt/1.4.1i cc: phk@phk.freebsd.dk 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 13:07:15 -0000 On Tue, Jul 29, 2003 at 11:42:51PM -0400, Jeff Roberson wrote: > On Wed, 30 Jul 2003 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. > > > > I definitely like this patch. If it works would you please commit it? > There are other issues for sure though. UMA can leak pages from zones > when they are destroyed. I'm going to look into this asap. > > Cheers, > Jeff Tor's patch does address the problem of having to account for the buckets in the zone as well (besides for just the pcpu cache buckets). So if it does get committed, can the calculation of uz_cachefree from the timer routine be axed in the same change, as it is no longer significant? -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/