Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jun 2002 16:42:49 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Bosko Milekic <bmilekic@unixdaemons.com>
Cc:        Alfred Perlstein <bright@mu.org>, Jeffrey Hsu <hsu@FreeBSD.ORG>, Luigi Rizzo <rizzo@icir.org>, net@FreeBSD.ORG
Subject:   Re: Should we keep a cache of mbuf+cluster ready for use ?
Message-ID:  <Pine.BSF.4.21.0206291637430.81668-100000@InterJet.elischer.org>
In-Reply-To: <20020629192929.A58120@unixdaemons.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0206291637430.81668-100000>