From owner-freebsd-current@FreeBSD.ORG Sat Jul 19 13:59:53 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 9F96C37B401 for ; Sat, 19 Jul 2003 13:59:53 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4F0A43F93 for ; Sat, 19 Jul 2003 13:59:52 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6JH3tEH037457; Sat, 19 Jul 2003 17:03:55 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6JH3tUi037456; Sat, 19 Jul 2003 17:03:55 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Sat, 19 Jul 2003 17:03:55 +0000 From: Bosko Milekic To: Lara & Harti Brandt Message-ID: <20030719170355.GA37444@technokratis.com> References: <20030718185122.N14232@beagle.fokus.fraunhofer.de> <20030718132503.GB29449@technokratis.com> <3F198E7E.4040309@fokus.fhg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F198E7E.4040309@fokus.fhg.de> User-Agent: Mutt/1.4.1i cc: current@freebsd.org Subject: Re: SMP problem with uma_zalloc 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: Sat, 19 Jul 2003 20:59:53 -0000 On Sat, Jul 19, 2003 at 08:31:26PM +0200, Lara & Harti Brandt wrote: [...] > Well the problem is, that nothing is starved. I have an idle machine and > a zone that I have limited to 60 or so items. When allocating the 2nd > item I get block on the zone limit. Usually I get unblocked whenever I > free an item. This will however not happen, because I have neither > reached the limit nor is there memory pressure in the system to which I > could react. I simply may be blocked forever. UMA_ZFLAG_FULL is set on the zone prior to the msleep(). This means that the next free will result in your wakeup, as the next free will be sent to the zone internally, and not the pcpu cache. > That makes the limit feature for zones rather useless, because I cannot > predict how many of the items I can really allocate (this depends on the > number of processors, the page size and the configuration of UMA itself). > > Perhaps we could make the behaviour dependent on the maximum number of > items. When it is rather low (a couple of pages worth) and I would block > on the zone limit and I have free items in another CPU's cache then > drain one of the caches. > > Or I could simply remove the limits. > > > harti > > > -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/