linux-stable/drivers/staging
Nitin Gupta 644bf7b598 Staging: xvmalloc memory allocator
* Features:
 - Low metadata overhead (just 4 bytes per object)
 - O(1) Alloc/Free - except when we have to call system page allocator to
   get additional memory.
 - Very low fragmentation: In all tests, xvmalloc memory usage is within 12%
   of "Ideal".
 - Pool based allocator: Each pool can grow and shrink.
 - It maps pages only when required. So, it does not hog vmalloc area which
   is very small on 32-bit systems.

SLUB allocator could not be used due to fragmentation issues:
http://code.google.com/p/compcache/wiki/AllocatorsComparison
Data here shows kmalloc using ~43% more memory than TLSF and xvMalloc
is showed ~2% more space efficiency than TLSF (due to smaller metadata).
Creating various kmem_caches can reduce space efficiency gap but still
problem of being limited to low memory exists. Also, it depends on
allocating higher order pages to reduce fragmentation - this is not
acceptable for ramzswap as it is used under memory crunch (its a swap
device!).

SLOB allocator could not be used do to reasons mentioned here:
http://lkml.org/lkml/2009/3/18/210

* Implementation:
It uses two-level bitmap search to find free list containing block of
correct size. This idea is taken from TLSF (Two-Level Segregate Fit)
allocator and is well explained in its paper (see [Links] below).

* Limitations:
 - Poor scalability: No per-cpu data structures (work in progress).

[Links]
1. Details and Performance data:
http://code.google.com/p/compcache/wiki/xvMalloc
http://code.google.com/p/compcache/wiki/xvMallocPerformance

2. TLSF memory allocator:
home: http://rtportal.upv.es/rtmalloc/
paper: http://rtportal.upv.es/rtmalloc/files/MRBC_2008.pdf

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:04 -08:00
..
altpciechdma Staging: altpciechdma: 64bit type warning fix 2009-09-15 12:02:26 -07:00
android Staging: android: mark subsystem as broken 2009-10-30 14:47:44 -07:00
arlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-12-08 07:55:01 -08:00
asus_oled Staging: asus_oled: Cleaned up checkpatch issues. 2009-09-15 12:02:33 -07:00
b3dfg Staging: b3dfg: remove check for pci bus master 2009-12-11 12:21:46 -08:00
comedi Staging: comedi: pcl816: update convert_src mask for AI cmdtest 2009-12-11 12:23:04 -08:00
cx25821 V4L/DVB (12851): cx25821/Makefile: Cleanup 2009-09-19 00:13:35 -03:00
dream Staging: dream: introduce missing kfree 2009-09-15 12:02:34 -07:00
dst Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2009-10-04 12:39:14 -07:00
echo Staging: echo: coding style cleanups 2009-09-15 12:02:16 -07:00
et131x Staging: et131x: Fix the add_10bit macro 2009-10-14 14:14:39 -07:00
frontier Staging: remove unused #include <linux/version.h>'s 2009-06-19 11:00:36 -07:00
go7007 V4L/DVB (13458): go7007: subdev conversion 2009-12-05 18:42:18 -02:00
hv Staging: hv: Fix some missing author names 2009-11-30 16:39:35 -08:00
iio staging: Complete sched.h removal from interrupt.h 2009-10-14 14:14:37 -07:00
line6 staging: line6: Convert simple_strtoul to strict_strtoul in midi.c 2009-12-11 12:21:48 -08:00
mimio
netwave Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-12-05 15:22:26 -08:00
octeon Staging: octeon-ethernet: Assign proper MAC addresses. 2009-11-23 18:55:34 +00:00
otus tree-wide: fix misspelling of "definition" in comments 2009-12-04 23:41:47 +01:00
p9auth Staging: p9auth: a few fixes 2009-10-09 13:47:24 -07:00
panel Staging: Panel: prevent driver from calling misc_deregister twice on same ressource 2009-10-30 14:47:43 -07:00
phison
poch Staging: poch: fix sched.h build breakage 2009-10-14 14:14:36 -07:00
pohmelfs writeback: remove unused nonblocking and congestion checks 2009-12-03 13:54:25 +01:00
quatech_usb2 Staging: quatech_usb2: Improvements to set_termios method 2009-09-15 12:01:36 -07:00
ramzswap Staging: xvmalloc memory allocator 2009-12-11 12:23:04 -08:00
rar Staging: rar/sep: Don't use random VENDOR_ID macros but the proper names 2009-09-15 12:02:12 -07:00
rt2860 Staging: remove no longer needed rt3090 driver 2009-12-11 12:21:46 -08:00
rt2870 Staging: rt28x0: updates from vendor's V2.1.0.0 drivers 2009-12-11 12:21:44 -08:00
rt3070 Staging: rt28x0: updates from vendor's V2.1.0.0 drivers 2009-12-11 12:21:44 -08:00
rt3090 Staging: remove no longer needed rt3090 driver 2009-12-11 12:21:46 -08:00
rtl8187se Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
rtl8192e Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-18 22:19:03 -08:00
rtl8192su Merge branch 'for-next' into for-linus 2009-12-07 18:36:35 +01:00
sep staging: Complete sched.h removal from interrupt.h 2009-10-14 14:14:37 -07:00
serqt_usb2 Staging: serqt_usb2: fix qt_open parameters 2009-09-15 12:02:06 -07:00
slicoss Staging: ARRAY_SIZE changes 2009-09-15 12:02:06 -07:00
strip Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-11-09 11:17:24 -08:00
udlfb Staging: udlfb: fix printk format warning 2009-09-15 12:02:06 -07:00
usbip Staging: usb-ip: vhci_hdc:Fix the returned error value 2009-09-15 12:02:05 -07:00
vme Staging: vme: fix sched.h build breakage 2009-10-14 14:14:36 -07:00
vt6655 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-01 22:13:38 -08:00
vt6656 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-01 22:13:38 -08:00
wavelan Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
winbond Staging: wireless drivers Kconfig change 2009-10-30 14:47:44 -07:00
wlan-ng Staging: wireless drivers Kconfig change 2009-10-30 14:47:44 -07:00
Kconfig Staging: remove no longer needed rt3090 driver 2009-12-11 12:21:46 -08:00
Makefile Staging: remove no longer needed rt3090 driver 2009-12-11 12:21:46 -08:00
staging.c