From owner-freebsd-current@FreeBSD.ORG Tue Dec 28 22:05:54 2004 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 43AB016A4CE; Tue, 28 Dec 2004 22:05:54 +0000 (GMT) Received: from stephanie.unixdaemons.com (stephanie.unixdaemons.com [67.18.111.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC3BE43D1F; Tue, 28 Dec 2004 22:05:53 +0000 (GMT) (envelope-from bmilekic@technokratis.com) Received: from stephanie.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1])iBSM5pPK063676; Tue, 28 Dec 2004 17:05:51 -0500 (EST) Received: (from bmilekic@localhost) by stephanie.unixdaemons.com (8.13.2/8.12.1/Submit) id iBSM5px7063675; Tue, 28 Dec 2004 17:05:51 -0500 (EST) (envelope-from bmilekic@technokratis.com) X-Authentication-Warning: stephanie.unixdaemons.com: bmilekic set sender to bmilekic@technokratis.com using -f Date: Tue, 28 Dec 2004 17:05:51 -0500 From: Bosko Milekic To: John Baldwin Message-ID: <20041228220551.GA62320@technokratis.com> References: <20041209144233.GA46928@peter.osted.lan> <20041226225651.GA87178@peter.osted.lan> <20041227013745.GA5267@technokratis.com> <200412281538.15251.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200412281538.15251.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i cc: freebsd-current@FreeBSD.org cc: current@FreeBSD.org Subject: Re: panic: uma_zone_slab is looping 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: Tue, 28 Dec 2004 22:05:54 -0000 On Tue, Dec 28, 2004 at 03:38:15PM -0500, John Baldwin wrote: > This is what I wondered about earlier in the thread. The problem is that > recursion needs to be a per-allocation (or per-thread) state, not per-zone, > since a zone may be used by multiple threads at the same time. Is it really > desired behavior of the bucket zone that if two threads alloc at the same > time one gets NULL because it sees the other's use and thinks it is > recursing? Not really, but in the bucket zone case it is less of a problem because a failed bucket allocation will just result in a uma_zalloc_internal() from occuring, and the probability of the bucket allocation failing because of that uk_recurse being [bogusely] non-zero and forcing a failure is relatively small, in that it might not be worth the effort of further instrumenting. In theory, the uk_recurse per-keg/zone flag is supposed to protect from re-entry from the VM, but in practise this is only really possible (or should only be possible) with the bucket zone itself. We should not have any OFFPAGE allocations from below (VM) requiring separate slab headers. The uk_recurse flag is imperfect in that sometimes it'll tell you it thinks there is a recursion but when in fact there isn't. As long as the behavior is constrained to solely the bucket zone and the probability of occurance of the latter event is small (even if it does occur for the bucket zone, it is not fatal, like it could be for other zones), it shouldn't matter. -- Bosko Milekic bmilekic@technokratis.com bmilekic@FreeBSD.org