diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-12 11:39:36 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-04 09:14:53 -0500 |
commit | 9b1185ea19c18b2ee690890d5a09ac8c30920ce7 (patch) | |
tree | 568ba2b23533a275ae066b39ed39f67d08441180 | |
parent | 047c44bf46250209528ed8b0d1868d57c708aa7e (diff) |
mm-vmalloc.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | mm/vmalloc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 27be2f0d4cb7..071155a6f83b 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) { |