Subject: Re: More pools
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/28/2003 10:32:59
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 28, 2003 at 05:07:14PM +0000, David Laight wrote:
> On Tue, Oct 28, 2003 at 09:24:22AM +1100, Simon Burge wrote:
> > Folks,
> >=20
> > The following diff adds pools for credentials, session headers and lockf
> > structures.  These appear to be the last of the fixed-sized structures
> > that are malloc'd with any serious frequency (at least for my usage
> > patterns).
>=20
> For credentials we should really merge the pcred and ucred (as used in ke=
rnel)
> structures into a single item.  They both have to change for a setuid
> binary anyway.
> (Note that the pcred is never shared - except possibly by irix).
>=20
> IMHO we ought to support indefinite sized cr_groups - so a pool doesn't
> work.

No, it can still work. We just pool allocate sets of them, and a ucred has=
=20
a chain of groups hanging off of it. Say we allocate them 16 per set. So=20
if you have 16 or fewer groups, you have one set. 17 to 32, two sets. And=
=20
so on. :-)

Take care,

Bill

--SLDf9lqlvOQaIe6s
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/nrZaWz+3JHUci9cRArFOAJsEr9mIfsNuApSiUwFcJs1z6FPfxACffMfc
LWgZcJkucjU96sEEROrP9f8=
=+gv5
-----END PGP SIGNATURE-----

--SLDf9lqlvOQaIe6s--