kernel-ark/mm
Christoph Lameter 1ceef40249 SLUB: Fix dynamic dma kmalloc cache creation
The dynamic dma kmalloc creation can run into trouble if a
GFP_ATOMIC allocation is the first one performed for a certain size
of dma kmalloc slab.

- Move the adding of the slab to sysfs into a workqueue
  (sysfs does GFP_KERNEL allocations)
- Do not call kmem_cache_destroy() (uses slub_lock)
- Only acquire the slub_lock once and--if we cannot wait--do a trylock.

  This introduces a slight risk of the first kmalloc(x, GFP_DMA|GFP_ATOMIC)
  for a range of sizes failing due to another process holding the slub_lock.
  However, we only need to acquire the spinlock once in order to establish
  each power of two DMA kmalloc cache. The possible conflict is with the
  slub_lock taken during slab management actions (create / remove slab cache).

  It is rather typical that a driver will first fill its buffers using
  GFP_KERNEL allocations which will wait until the slub_lock can be acquired.
  Drivers will also create its slab caches first outside of an atomic
  context before starting to use atomic kmalloc from an interrupt context.

  If there are any failures then they will occur early after boot or when
  loading of multiple drivers concurrently. Drivers can already accomodate
  failures of GFP_ATOMIC for other reasons. Retries will then create the slab.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
2007-08-09 21:57:16 -07:00
..
allocpercpu.c
backing-dev.c
bootmem.c
bounce.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
fadvise.c
filemap_xip.c
filemap.c fix filemap.c kernel-doc 2007-07-31 15:39:38 -07:00
filemap.h
fremap.c
highmem.c
hugetlb.c fix hugetlb page allocation leak 2007-07-24 12:24:59 -07:00
internal.h
Kconfig Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION 2007-07-29 16:45:38 -07:00
madvise.c
Makefile
memory_hotplug.c
memory.c
mempolicy.c
mempool.c
migrate.c memory unplug: isolate_lru_page fix 2007-07-26 11:35:17 -07:00
mincore.c
mlock.c
mmap.c Remove fs.h from mm.h 2007-07-29 17:09:29 -07:00
mmzone.c
mprotect.c
mremap.c
msync.c
nommu.c
oom_kill.c oom: print points as unsigned long 2007-07-31 15:39:36 -07:00
page_alloc.c Do not trigger OOM-killer for high-order allocation failures 2007-07-31 15:39:36 -07:00
page_io.c
page-writeback.c
pdflush.c
prio_tree.c
quicklist.c
readahead.c
rmap.c
shmem_acl.c
shmem.c
slab.c slab: correctly handle __GFP_ZERO 2007-07-24 12:24:59 -07:00
slob.c
slub.c SLUB: Fix dynamic dma kmalloc cache creation 2007-08-09 21:57:16 -07:00
sparse.c x86_64: fix section mismatch warning in init.c 2007-07-22 11:03:38 -07:00
swap_state.c
swap.c
swapfile.c Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION 2007-07-29 16:45:38 -07:00
thrash.c
tiny-shmem.c
truncate.c
util.c
vmalloc.c
vmscan.c
vmstat.c Remove fs.h from mm.h 2007-07-29 17:09:29 -07:00