Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2003 01:04:31 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        Marcel Moolenaar <marcel@xcllnt.net>
Subject:   Re: cvs commit: src/sys/fs/specfs spec_vnops.c
Message-ID:  <20030904010250.L15754@odysseus.silby.com>
In-Reply-To: <20030827231807.I12093-100000@mail.chesapeake.net>
References:  <20030827231807.I12093-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-2111628021-1062655471=:16553
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Wed, 27 Aug 2003, Jeff Roberson wrote:

> It uses an 8 bit index to identify individual items in a slab.  This is to
> save space in place of the full pointer that is used in traditional slab
> allocators.  With an 8 bit index your smallest allocation on 4k pages is
> 16 bytes and 32 bytes on 8k.  It'd be 128 bytes on 32k.  You're going to
> have to conditionally compile UMA with 16bit indexes.
>
> Cheers,
> Jeff

You can't just change the index to 16 bits, it'll break.  I've attached a
patch which allows you to play with the freelist type freely... I don't
have any immediate plans to commit it (now that I'm sidetracked onto other
things), but I think it's solid.

Mike "Silby" Silbersack
--0-2111628021-1062655471=:16553
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="variable_freelist.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <20030904010431.H16553@odysseus.silby.com>
Content-Description: 
Content-Disposition: attachment; filename="variable_freelist.patch"

ZGlmZiAtdSAtciAvdXNyL3NyYy9zeXMub2xkL3ZtL3VtYS5oIC91c3Ivc3Jj
L3N5cy92bS91bWEuaA0KLS0tIC91c3Ivc3JjL3N5cy5vbGQvdm0vdW1hLmgJ
TW9uIEF1ZyAxMSAxNjo1NzoxNSAyMDAzDQorKysgL3Vzci9zcmMvc3lzL3Zt
L3VtYS5oCVNhdCBBdWcgMTYg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