From owner-freebsd-arch Sat Feb 16 14: 0:26 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 36B0037B402; Sat, 16 Feb 2002 14:00:06 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1GM04F39752; Sat, 16 Feb 2002 14:00:04 -0800 (PST) (envelope-from dillon) Date: Sat, 16 Feb 2002 14:00:04 -0800 (PST) From: Matthew Dillon Message-Id: <200202162200.g1GM04F39752@apollo.backplane.com> To: Alfred Perlstein Cc: Poul-Henning Kamp , arch@FreeBSD.ORG, jhb@FreeBSD.ORG, peter@wemm.org, jake@locore.ca Subject: Re: gettimeofday() and crhold()/crfree() (was Re: gettimeofday() and copyout(). Is copyout() MPSAFE on non-i386 archs? ) References: <6988.1013844797@critter.freebsd.dk> <200202162033.g1GKXOf13029@apollo.backplane.com> <20020216214709.GA12136@elvis.mu.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :Go ahead with using mutex pools for creds, I thought I'd done it :already but it looks like I only got to struct file and struct :uidinfo. :) : :I do sort of think that keeping your own cred freelist is probably :a bad idea especially with what Jeff R has coming down the pipe for :us. But we can take that out later if something better comes along. : :-Alfred Well, I dunno... I'm warming to the idea if it in fact eases the job of pushing Giant down. It seems so easy to do for the ucred, though of course I am not trying to proactively trim down the size of the freelist (yet)... but even that would be fairly simple to do in the allocation code by adding a count of the number of items in the freelist. It would be another ten lines of code relative to the patch I just posted. int cr_free_count; .. in allocation code do while (cr_free_count > HYSTERESIS) { ... free ... } -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message