public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow arch override for kmem_bufctl_t
@ 2004-05-15 12:13 Manfred Spraul
  2004-05-15 12:24 ` Manfred Spraul
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Manfred Spraul @ 2004-05-15 12:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-arch

Hi Andrew,

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 allows an arch override 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 patch switches i386, the port maintainers should switch their arch 
if there are no problems with 16-bit quantities. All accesses to 
kmem_bufctl_t are under a per-cache spinlock and not in the hottest path.

Could you apply it to -mm?

--
    Manfred

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-05-18  5:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-15 12:13 [PATCH] Allow arch override for kmem_bufctl_t Manfred Spraul
2004-05-15 12:24 ` Manfred Spraul
2004-05-17  9:09   ` Andi Kleen
2004-05-17  9:11 ` Geert Uytterhoeven
2004-05-17 11:28   ` Ralf Baechle
2004-05-17 11:39   ` Ivan Kokshaysky
2004-05-17 12:39     ` Andi Kleen
2004-05-17 18:22 ` David Mosberger
2004-05-17 21:16 ` David S. Miller
2004-05-17 21:25   ` Matthew Wilcox
2004-05-18  5:04     ` Manfred Spraul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox