linux-stable-rt/lib
Huang Ying 7f184275aa lib, Make gen_pool memory allocator lockless
This version of the gen_pool memory allocator supports lockless
operation.

This makes it safe to use in NMI handlers and other special
unblockable contexts that could otherwise deadlock on locks.  This is
implemented by using atomic operations and retries on any conflicts.
The disadvantage is that there may be livelocks in extreme cases.  For
better scalability, one gen_pool allocator can be used for each CPU.

The lockless operation only works if there is enough memory available.
If new memory is added to the pool a lock has to be still taken.  So
any user relying on locklessness has to ensure that sufficient memory
is preallocated.

The basic atomic operation of this allocator is cmpxchg on long.  On
architectures that don't have NMI-safe cmpxchg implementation, the
allocator can NOT be used in NMI handler.  So code uses the allocator
in NMI handler should depend on CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2011-08-03 11:15:57 -04:00
..
lzo
raid6
reed_solomon
xz XZ decompressor: Fix decoding of empty LZMA2 streams 2011-05-02 08:46:12 -07:00
zlib_deflate
zlib_inflate
.gitignore
Kconfig lib, Add lock-less NULL terminated single list 2011-08-03 11:15:56 -04:00
Kconfig.debug tile: enable CONFIG_BUGVERBOSE 2011-06-01 16:06:04 -04:00
Kconfig.kgdb
Kconfig.kmemcheck
Makefile lib, Add lock-less NULL terminated single list 2011-08-03 11:15:56 -04:00
argv_split.c
atomic64.c
atomic64_test.c
audit.c audit: support the "standard" <asm-generic/unistd.h> 2011-05-04 14:41:28 -04:00
average.c
bcd.c
bch.c
bitmap.c lib, Make gen_pool memory allocator lockless 2011-08-03 11:15:57 -04:00
bitrev.c
bsearch.c lib: Add generic binary search function to the kernel. 2011-05-19 16:55:27 +09:30
btree.c
bug.c
bust_spinlocks.c
check_signature.c
checksum.c
cmdline.c
cpu-notifier-error-inject.c
cpu_rmap.c
cpumask.c
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc7.c
crc16.c
crc32.c
crc32defs.h
ctype.c
debug_locks.c
debugobjects.c debugobjects: Fix boot crash when kmemleak and debugobjects enabled 2011-06-20 14:38:43 +02:00
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
devres.c
div64.c
dma-debug.c dma-debug: print information about leaked entry 2011-04-07 16:31:19 +02:00
dump_stack.c
dynamic_debug.c
extable.c
fault-inject.c
find_last_bit.c bitops: add #ifndef for each of find bitops 2011-05-26 17:12:38 -07:00
find_next_bit.c arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
flex_array.c flex_array: avoid divisions when accessing elements 2011-05-26 17:12:33 -07:00
gcd.c
gen_crc32table.c
genalloc.c lib, Make gen_pool memory allocator lockless 2011-08-03 11:15:57 -04:00
halfmd4.c
hexdump.c
hweight.c
idr.c
inflate.c
int_sqrt.c
iomap.c
iomap_copy.c
iommu-helper.c
ioremap.c
irq_regs.c
is_single_threaded.c
kasprintf.c
klist.c
kobject.c Delay struct net freeing while there's a sysfs instance refering to it 2011-06-12 17:45:41 -04:00
kobject_uevent.c
kref.c
kstrtox.c lib: add kstrto*_from_user() 2011-05-25 08:39:52 -07:00
lcm.c
libcrc32c.c
list_debug.c
list_sort.c
llist.c lib, Add lock-less NULL terminated single list 2011-08-03 11:15:56 -04:00
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c rcu: Fix unpaired rcu_irq_enter() from locking selftests 2011-05-26 09:42:19 -07:00
lru_cache.c lru_cache: use correct type in sizeof for allocation 2011-05-25 08:39:52 -07:00
nlattr.c
parser.c
percpu_counter.c
plist.c
prio_heap.c
prio_tree.c
proportions.c
radix-tree.c
random32.c
ratelimit.c
rational.c
rbtree.c
reciprocal_div.c
rwsem-spinlock.c
rwsem.c
scatterlist.c
sha1.c
show_mem.c arch, mm: filter disallowed nodes from arch specific show_mem functions 2011-05-25 08:39:03 -07:00
smp_processor_id.c
sort.c
spinlock_debug.c
string.c Add a strtobool function matching semantics of existing in kernel equivalents 2011-05-19 16:55:28 +09:30
string_helpers.c
swiotlb.c swiotlb: Export swioltb_nr_tbl and utilize it as appropiate. 2011-06-06 15:41:16 -04:00
syscall.c
test-kstrtox.c kstrtox: fix compile warnings in test 2011-04-14 16:06:54 -07:00
textsearch.c
timerqueue.c
ts_bm.c
ts_fsm.c
ts_kmp.c
uuid.c
vsprintf.c vsprintf: Update %pI6c to not compress a single 0 2011-06-09 12:51:15 -07:00