summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-12 11:39:36 +0200
committerClark Williams <williams@redhat.com>2012-04-11 11:07:49 -0500
commit5235850a8a673a62712f22f29ef214121a1b31e4 (patch)
tree7d6408563107b1e5b76d0f2b5e4669ece8a86cb4
parentf229c1012c3e1e6f3c8e8993081112548faa4193 (diff)
mm-vmalloc.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--mm/vmalloc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 94dff883b449..b8529683b315 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -782,7 +782,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
struct vmap_block *vb;
struct vmap_area *va;
unsigned long vb_idx;
- int node, err;
+ int node, err, cpu;
node = numa_node_id();
@@ -821,12 +821,13 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
BUG_ON(err);
radix_tree_preload_end();
- vbq = &get_cpu_var(vmap_block_queue);
+ cpu = get_cpu_light();
+ vbq = &__get_cpu_var(vmap_block_queue);
vb->vbq = vbq;
spin_lock(&vbq->lock);
list_add_rcu(&vb->free_list, &vbq->free);
spin_unlock(&vbq->lock);
- put_cpu_var(vmap_block_queue);
+ put_cpu_light();
return vb;
}
@@ -900,7 +901,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
struct vmap_block *vb;
unsigned long addr = 0;
unsigned int order;
- int purge = 0;
+ int purge = 0, cpu;
BUG_ON(size & ~PAGE_MASK);
BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC);
@@ -908,7 +909,8 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
again:
rcu_read_lock();
- vbq = &get_cpu_var(vmap_block_queue);
+ cpu = get_cpu_light();
+ vbq = &__get_cpu_var(vmap_block_queue);
list_for_each_entry_rcu(vb, &vbq->free, free_list) {
int i;
@@ -945,7 +947,7 @@ next:
if (purge)
purge_fragmented_blocks_thiscpu();
- put_cpu_var(vmap_block_queue);
+ put_cpu_light();
rcu_read_unlock();
if (!addr) {