diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-19 02:35:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-19 02:35:39 -0700 |
| commit | a3e754c2e0c086dfa9e64b672d8a529ef5dfd8c2 (patch) | |
| tree | ea55c70cf5cef37ad467cecfc76297b54cf9ae2d /include/asm-mips | |
| parent | 897d49be87feb06747a3538e7fbf16cdcd349b75 (diff) | |
[PATCH] slab: allow arch override for kmem_bufctl_t
From: Manfred Spraul <manfred@colorfullife.com>
The slab allocator keeps track of the free objects in a slab with a linked
list of integers (typedef'ed to kmem_bufctl_t). Right now unsigned int is
used for kmem_bufctl_t, i.e. 4 bytes per-object overhead.
The attached patch implements a per-arch definition of for this type:
Theoretically, unsigned short is sufficient for kmem_bufctl_t and this would
reduce the per-object overhead to 2 bytes. But some archs cannot operate on
16-bit values efficiently, thus it's not possible to switch everyone to
ushort.
The chosen types are a result of dicussions with the various arch maintainers.
Diffstat (limited to 'include/asm-mips')
| -rw-r--r-- | include/asm-mips/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index b949ab33e8e2..d2f0c76b00a9 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h @@ -99,6 +99,8 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif +typedef unsigned short kmem_bufctl_t; + #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ |
