linux/include
Pekka Enberg 5595cffc82 SLUB: dynamic per-cache MIN_PARTIAL
This patch changes the static MIN_PARTIAL to a dynamic per-cache ->min_partial
value that is calculated from object size. The bigger the object size, the more
pages we keep on the partial list.

I tested SLAB, SLUB, and SLUB with this patch on Jens Axboe's 'netio' example
script of the fio benchmarking tool. The script stresses the networking
subsystem which should also give a fairly good beating of kmalloc() et al.

To run the test yourself, first clone the fio repository:

  git clone git://git.kernel.dk/fio.git

and then run the following command n times on your machine:

  time ./fio examples/netio

The results on my 2-way 64-bit x86 machine are as follows:

  [ the minimum, maximum, and average are captured from 50 individual runs ]

                 real time (seconds)
                 min      max      avg      sd
  SLAB           22.76    23.38    22.98    0.17
  SLUB           22.80    25.78    23.46    0.72
  SLUB (dynamic) 22.74    23.54    23.00    0.20

                 sys time (seconds)
                 min      max      avg      sd
  SLAB           6.90     8.28     7.70     0.28
  SLUB           7.42     16.95    8.89     2.28
  SLUB (dynamic) 7.17     8.64     7.73     0.29

                 user time (seconds)
                 min      max      avg      sd
  SLAB           36.89    38.11    37.50    0.29
  SLUB           30.85    37.99    37.06    1.67
  SLUB (dynamic) 36.75    38.07    37.59    0.32

As you can see from the above numbers, this patch brings SLUB to the same level
as SLAB for this particular workload fixing a ~2% regression. I'd expect this
change to help similar workloads that allocate a lot of objects that are close
to the size of a page.

Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2008-08-05 09:28:47 +03:00
..
acpi PCI: disable ASPM per ACPI FADT setting 2008-07-28 14:56:09 -07:00
asm-alpha [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-arm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-28 18:14:24 -07:00
asm-avr32 Merge commit 'upstream/master' 2008-07-27 13:54:08 +02:00
asm-blackfin [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-cris Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
asm-frv [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-generic Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-28 18:14:24 -07:00
asm-h8300 [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-ia64 [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-m32r [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-m68k [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-m68knommu [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-mips [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-mn10300 [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-parisc [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-powerpc powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bit 2008-07-28 16:30:52 +10:00
asm-s390 KVM: s390: Fix instruction naming for lctlg 2008-07-27 11:36:12 +03:00
asm-sh Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
asm-um [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-x86 Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
asm-xtensa [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
crypto crypto: hash - Move ahash functions into crypto/hash.h 2008-07-10 20:35:18 +08:00
drm drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
keys
linux SLUB: dynamic per-cache MIN_PARTIAL 2008-08-05 09:28:47 +03:00
math-emu
media V4L/DVB (8525): fix a few assorted spelling mistakes. 2008-07-27 11:07:13 -03:00
mtd Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 10:40:14 -04:00
net missing bits of net-namespace / sysctl 2008-07-27 09:45:34 -07:00
pcmcia
rdma dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
rxrpc
scsi [SCSI] extend the last_sector_bug flag to cover more sectors 2008-07-27 10:16:13 -04:00
sound ALSA: Release v1.0.17 2008-07-14 09:54:43 +02:00
video include/video/atmel_lcdc.h must #include <linux/workqueue.h> 2008-07-26 12:00:01 -07:00
xen xen: implement Xen-specific spinlocks 2008-07-16 11:15:53 +02:00
Kbuild kbuild: only one call for include/ in make headers_* 2008-07-25 22:11:44 +02:00