From owner-freebsd-current@FreeBSD.ORG Tue Jul 29 20:42:56 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 DDC4237B401; Tue, 29 Jul 2003 20:42:56 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD2F843FA3; Tue, 29 Jul 2003 20:42:55 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h6U3gp621044; Tue, 29 Jul 2003 23:42:51 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Tue, 29 Jul 2003 23:42:51 -0400 (EDT) From: Jeff Roberson To: Tor.Egge@cvsup.no.freebsd.org In-Reply-To: <20030730012321I.tegge@cvsup.no.freebsd.org> Message-ID: <20030729234117.U14210-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 03:42:57 -0000 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