From owner-freebsd-net Sat Jun 29 17: 0:18 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C9B537B400; Sat, 29 Jun 2002 17:00:13 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9E2E43E09; Sat, 29 Jun 2002 17:00:12 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020630000012.ONM9178.rwcrmhc51.attbi.com@InterJet.elischer.org>; Sun, 30 Jun 2002 00:00:12 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA81918; Sat, 29 Jun 2002 16:42:51 -0700 (PDT) Date: Sat, 29 Jun 2002 16:42:49 -0700 (PDT) From: Julian Elischer To: Bosko Milekic Cc: Alfred Perlstein , Jeffrey Hsu , Luigi Rizzo , net@FreeBSD.ORG Subject: Re: Should we keep a cache of mbuf+cluster ready for use ? In-Reply-To: <20020629192929.A58120@unixdaemons.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I'd say yes. you could let uma hold them for you as it has support for 'constructors and destructors' for types you ask it to manage. it will call the constructor whenever it needs to create a new one and teh destructor when it gives that memeory back to the system. In between the two operations, the memory is type-stable, so you can have it allocate arbitrarily complicated objects. I'm allocating thread structures, which have KVM mapped kernel stacks hanging off them. So what UMA is handing me is not a simple mamory object but a structure, which owns a vm object and anothermamory range linked to it. (including the PCB). there is no reason uma cannot and you a mbuf wit a cluster already on it.. Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message