• Andrew Morton's avatar
    [PATCH] slab: allow arch override for kmem_bufctl_t · a3e754c2
    Andrew Morton authored
    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.
    a3e754c2
types.h 1.09 KB