remarkable-linux/mm
Paul Jackson 101a50019a [PATCH] cpuset memory spread slab cache implementation
Provide the slab cache infrastructure to support cpuset memory spreading.

See the previous patches, cpuset_mem_spread, for an explanation of cpuset
memory spreading.

This patch provides a slab cache SLAB_MEM_SPREAD flag.  If set in the
kmem_cache_create() call defining a slab cache, then any task marked with the
process state flag PF_MEMSPREAD will spread memory page allocations for that
cache over all the allowed nodes, instead of preferring the local (faulting)
node.

On systems not configured with CONFIG_NUMA, this results in no change to the
page allocation code path for slab caches.

On systems with cpusets configured in the kernel, but the "memory_spread"
cpuset option not enabled for the current tasks cpuset, this adds a call to a
cpuset routine and failed bit test of the processor state flag PF_SPREAD_SLAB.

For tasks so marked, a second inline test is done for the slab cache flag
SLAB_MEM_SPREAD, and if that is set and if the allocation is not
in_interrupt(), this adds a call to to a cpuset routine that computes which of
the tasks mems_allowed nodes should be preferred for this allocation.

==> This patch adds another hook into the performance critical
    code path to allocating objects from the slab cache, in the
    ____cache_alloc() chunk, below.  The next patch optimizes this
    hook, reducing the impact of the combined mempolicy plus memory
    spreading hooks on this critical code path to a single check
    against the tasks task_struct flags word.

This patch provides the generic slab flags and logic needed to apply memory
spreading to a particular slab.

A subsequent patch will mark a few specific slab caches for this placement
policy.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:23 -08:00
..
bootmem.c
fadvise.c [PATCH] fadvise: return ESPIPE on FIFO/pipe 2006-01-08 20:14:00 -08:00
filemap.c [PATCH] cpuset memory spread page cache implementation and hooks 2006-03-24 07:33:22 -08:00
filemap.h
filemap_xip.c [PATCH] replace inode_update_time with file_update_time 2006-01-10 08:01:30 -08:00
fremap.c
highmem.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
hugetlb.c [PATCH] mm: hugetlb alloc_fresh_huge_page bogus node loop fix 2006-03-22 07:54:06 -08:00
internal.h [PATCH] remove set_page_count() outside mm/ 2006-03-22 07:54:02 -08:00
Kconfig [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
madvise.c [PATCH] madvise MADV_DONTFORK/MADV_DOFORK 2006-02-14 16:09:34 -08:00
Makefile [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
memory.c [PATCH] hugepage: Fix hugepage logic in free_pgtables() harder 2006-03-22 07:54:04 -08:00
memory_hotplug.c [PATCH] memory hotadd: pgdat->node_present_pages fix 2006-03-09 19:47:38 -08:00
mempolicy.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
mempool.c [PATCH] mm: kill kmem_cache_t usage 2006-03-22 07:53:58 -08:00
migrate.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
mincore.c
mlock.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
mmap.c [PATCH] remove VM_DONTCOPY bogosities 2006-03-22 07:54:01 -08:00
mprotect.c [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
mremap.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
msync.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
nommu.c [PATCH] mm: nommu use compound pages 2006-03-22 07:54:01 -08:00
oom_kill.c [PATCH] out_of_memory() locking fix 2006-03-02 08:33:07 -08:00
page-writeback.c [PATCH] Represent laptop_mode as jiffies internally 2006-03-24 07:33:20 -08:00
page_alloc.c [PATCH] cpusets: only wakeup kswapd for zones in the current cpuset 2006-03-24 07:33:22 -08:00
page_io.c
pdflush.c
prio_tree.c
readahead.c [PATCH] ext3_readdir: use generic readahead 2006-03-23 07:38:09 -08:00
rmap.c [PATCH] mm: more CONFIG_DEBUG_VM 2006-03-22 07:54:02 -08:00
shmem.c [PATCH] shmem: inline to avoid warning 2006-03-22 07:54:02 -08:00
slab.c [PATCH] cpuset memory spread slab cache implementation 2006-03-24 07:33:23 -08:00
slob.c [PATCH] SLOB=y && SMP=y fix 2006-02-08 07:52:58 -08:00
sparse.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
swap.c [PATCH] mm: less atomic ops 2006-03-22 07:53:57 -08:00
swap_state.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
swapfile.c [PATCH] swsusp: userland interface 2006-03-23 07:38:07 -08:00
thrash.c
tiny-shmem.c [PATCH] do_truncate() call fix in tiny-shmem.c 2006-01-12 09:08:49 -08:00
truncate.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
util.c [PATCH] slob: introduce mm/util.c for shared functions 2006-01-08 20:13:41 -08:00
vmalloc.c
vmscan.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00