diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-04 22:49:46 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-04 22:49:46 -0400 |
commit | e50f2fb8eef877fa49a0f33745195ccfdd87c351 (patch) | |
tree | 05cd86d1092fa8047f21661b1cddf524edc561ff | |
parent | d0de6e4cb45053d5b4aa4ad75b37e440ca1b9510 (diff) | |
download | 4.8-rt-patches-e50f2fb8eef877fa49a0f33745195ccfdd87c351.tar.gz |
radix: expand around new preload variant
-rw-r--r-- | patches/radix-tree-rt-aware.patch | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/patches/radix-tree-rt-aware.patch b/patches/radix-tree-rt-aware.patch index 74153198e1647f..359b441c78f6d1 100644 --- a/patches/radix-tree-rt-aware.patch +++ b/patches/radix-tree-rt-aware.patch @@ -1,4 +1,4 @@ -From 46fd03482622fc790c8b9a7fe6231d0d0834a73a Mon Sep 17 00:00:00 2001 +From 6de8974ea119a844ca4468b3986acf19e53fc3fa Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 21:33:18 +0200 Subject: [PATCH] radix-tree: Make RT aware @@ -8,26 +8,30 @@ preemption disabled which may cause high latencies and breaks if the user tries to grab any locks after invoking it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +[PG: expand to include radix_tree_maybe_preload_order added in v4.8] +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h -index cb4b7e8cee81..a4b0317a63ae 100644 +index cbfee507c839..069e7abf998b 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h -@@ -289,8 +289,13 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, +@@ -289,9 +289,15 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root, void ***results, unsigned long *indices, unsigned long first_index, unsigned int max_items); +#ifndef CONFIG_PREEMPT_RT_FULL int radix_tree_preload(gfp_t gfp_mask); int radix_tree_maybe_preload(gfp_t gfp_mask); + int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order); +#else +static inline int radix_tree_preload(gfp_t gm) { return 0; } +static inline int radix_tree_maybe_preload(gfp_t gfp_mask) { return 0; } ++static inline int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order) { return 0; } +#endif void radix_tree_init(void); void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag); -@@ -315,7 +320,7 @@ unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item); +@@ -316,7 +322,7 @@ unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item); static inline void radix_tree_preload_end(void) { @@ -37,10 +41,10 @@ index cb4b7e8cee81..a4b0317a63ae 100644 /** diff --git a/lib/radix-tree.c b/lib/radix-tree.c -index 8b7d8459bb9d..748a1628664d 100644 +index 61b8fb529cef..cf2c0ae9aaad 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c -@@ -286,13 +286,14 @@ radix_tree_node_alloc(struct radix_tree_root *root) +@@ -289,13 +289,14 @@ radix_tree_node_alloc(struct radix_tree_root *root) * succeed in getting a node here (and never reach * kmem_cache_alloc) */ @@ -56,7 +60,7 @@ index 8b7d8459bb9d..748a1628664d 100644 /* * Update the allocation stack trace as this is more useful * for debugging. -@@ -333,6 +334,7 @@ radix_tree_node_free(struct radix_tree_node *node) +@@ -336,6 +337,7 @@ radix_tree_node_free(struct radix_tree_node *node) call_rcu(&node->rcu_head, radix_tree_node_rcu_free); } @@ -64,10 +68,10 @@ index 8b7d8459bb9d..748a1628664d 100644 /* * 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 -@@ -401,6 +403,7 @@ int radix_tree_maybe_preload(gfp_t gfp_mask) - return 0; +@@ -449,6 +451,7 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order) + + return __radix_tree_preload(gfp_mask, nr_nodes); } - EXPORT_SYMBOL(radix_tree_maybe_preload); +#endif /* |