diff options
author | Christoph Lameter <clameter@engr.sgi.com> | 2006-01-19 01:42:37 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-19 03:20:18 (GMT) |
commit | 86c562a9d6683063e071692fe14e0a18e64ee1be (patch) | |
tree | dd64f8bff4624f17f2245aeadf962e0d6d5974a0 /mm/slab.c | |
parent | dc85da15d42b0efc792b0f5eab774dc5dbc1ceec (diff) | |
download | linux-fsl-qoriq-86c562a9d6683063e071692fe14e0a18e64ee1be.tar.xz |
[PATCH] mm: optimize numa policy handling in slab allocator
Move the interrupt check from slab_node into ___cache_alloc and adds an
"unlikely()" to avoid pipeline stalls on some architectures.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2574,7 +2574,7 @@ static inline void *____cache_alloc(kmem_cache_t *cachep, gfp_t flags) struct array_cache *ac; #ifdef CONFIG_NUMA - if (current->mempolicy) { + if (unlikely(current->mempolicy && !in_interrupt())) { int nid = slab_node(current->mempolicy); if (nid != numa_node_id()) |