aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 21:33:18 +0200
committerAnders Roxell <anders.roxell@linaro.org>2015-05-08 22:30:57 +0200
commita35b1f67e0b7c0978d96d7037ec2b1d75a4691e6 (patch)
tree5ade4e2ce44a25d03d1298a5968a016e0bed57bf /lib
parent59bef1f6ba568d290d41fae7e0118e0b5561c927 (diff)
radix-tree-rt-aware.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/radix-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 3291a8e37490..f783149480e5 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -195,12 +195,13 @@ radix_tree_node_alloc(struct radix_tree_root *root)
* succeed in getting a node here (and never reach
* kmem_cache_alloc)
*/
- rtp = this_cpu_ptr(&radix_tree_preloads);
+ rtp = &get_cpu_var(radix_tree_preloads);
if (rtp->nr) {
ret = rtp->nodes[rtp->nr - 1];
rtp->nodes[rtp->nr - 1] = NULL;
rtp->nr--;
}
+ put_cpu_var(radix_tree_preloads);
/*
* Update the allocation stack trace as this is more useful
* for debugging.
@@ -240,6 +241,7 @@ radix_tree_node_free(struct radix_tree_node *node)
call_rcu(&node->rcu_head, radix_tree_node_rcu_free);
}
+#ifndef CONFIG_PREEMPT_RT_FULL
/*
* Load up this CPU's radix_tree_node buffer with sufficient objects to
* ensure that the addition of a single element in the tree cannot fail. On
@@ -305,6 +307,7 @@ int radix_tree_maybe_preload(gfp_t gfp_mask)
return 0;
}
EXPORT_SYMBOL(radix_tree_maybe_preload);
+#endif
/*
* Return the maximum key which can be store into a