linux/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 Slab allocators: Replace explicit zeroing with __GFP_ZERO 2007-07-17 10:23:02 -07:00
backing-dev.c remove mm/backing-dev.c:congestion_wait_interruptible() 2007-07-16 09:05:52 -07:00
bootmem.c [PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols 2006-12-07 08:39:44 -08:00
bounce.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
fadvise.c [PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path 2006-12-08 08:28:43 -08:00
filemap_xip.c mm: fault feedback #2 2007-07-19 10:04:41 -07:00
filemap.c fix filemap.c kernel-doc 2007-07-31 15:39:38 -07:00
filemap.h Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
fremap.c only allow nonlinear vmas for ram backed filesystems 2007-07-19 10:04:41 -07:00
highmem.c Create the ZONE_MOVABLE zone 2007-07-17 10:22:59 -07:00
hugetlb.c fix hugetlb page allocation leak 2007-07-24 12:24:59 -07:00
internal.h Make page->private usable in compound pages 2007-05-07 12:12:53 -07:00
Kconfig Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION 2007-07-29 16:45:38 -07:00
madvise.c speed up madvise_need_mmap_write() usage 2007-07-16 09:05:36 -07:00
Makefile CONFIG_BOUNCE to avoid useless inclusion of bounce buffer logic 2007-07-17 10:23:02 -07:00
memory_hotplug.c memory hotplug: fix unnecessary calling of init_currenty_empty_zone() 2007-06-01 08:18:29 -07:00
memory.c remove handle_mm_fault export 2007-07-21 17:49:16 -07:00
mempolicy.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
mempool.c Slab allocators: Replace explicit zeroing with __GFP_ZERO 2007-07-17 10:23:02 -07:00
migrate.c memory unplug: isolate_lru_page fix 2007-07-26 11:35:17 -07:00
mincore.c [PATCH] mincore: vma crossing fix 2007-02-15 09:57:03 -08:00
mlock.c do not limit locked memory when RLIMIT_MEMLOCK is RLIM_INFINITY 2007-07-16 09:05:37 -07:00
mmap.c Remove fs.h from mm.h 2007-07-29 17:09:29 -07:00
mmzone.c [PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols 2006-12-07 08:39:44 -08:00
mprotect.c mm: variable length argument support 2007-07-19 10:04:45 -07:00
mremap.c mm: variable length argument support 2007-07-19 10:04:45 -07:00
msync.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
nommu.c nommu: vmalloc_32_user()/vm_insert_page() and symbol exports. 2007-07-21 17:49:14 -07:00
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 [PATCH] swsusp: use block device offsets to identify swap locations 2006-12-07 08:39:27 -08:00
page-writeback.c move page writeback acounting out of macros 2007-07-19 10:04:52 -07:00
pdflush.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
prio_tree.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
quicklist.c Quicklists for page table pages 2007-05-07 12:12:54 -07:00
readahead.c readahead: sanify file_ra_state names 2007-07-19 10:04:44 -07:00
rmap.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
shmem_acl.c [PATCH] Fix typos in mm/shmem_acl.c 2006-10-11 11:14:23 -07:00
shmem.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
slab.c slab: correctly handle __GFP_ZERO 2007-07-24 12:24:59 -07:00
slob.c slob: reduce list scanning 2007-07-21 17:49:16 -07:00
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 Add __GFP_MOVABLE for callers to flag allocations from high memory that may be migrated 2007-07-17 10:22:59 -07:00
swap.c Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
swapfile.c Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION 2007-07-29 16:45:38 -07:00
thrash.c Bug in mm/thrash.c function grab_swap_token() 2007-05-11 08:29:32 -07:00
tiny-shmem.c [PATCH] mm/{,tiny-}shmem.c cleanups 2007-03-01 14:53:35 -08:00
truncate.c mm: merge populate and nopage into fault (fixes nonlinear) 2007-07-19 10:04:41 -07:00
util.c add kstrndup 2007-07-18 08:47:39 -07:00
vmalloc.c lguest: export symbols for lguest as a module 2007-07-19 10:04:52 -07:00
vmscan.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
vmstat.c Remove fs.h from mm.h 2007-07-29 17:09:29 -07:00