summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2011-01-03 19:44:56 -0800
committerJosh Triplett <josh@joshtriplett.org>2011-01-03 19:44:56 -0800
commitf70a3b67b99450604603f9de630aeba72fc4b4e6 (patch)
tree6e729343b9da4025f873c9ad45cbeba4bbc8558a
parente28a777ca3a51f1df4467c1fd4327bf2aab58965 (diff)
downloadrcuhashbash-f70a3b67b99450604603f9de630aeba72fc4b4e6.tar.gz
Move rcuhashbash_read_thread next to rcuhashbash_resize_thread after all ops
-rw-r--r--rcuhashbash-resize.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/rcuhashbash-resize.c b/rcuhashbash-resize.c
index 77ddc50..f071018 100644
--- a/rcuhashbash-resize.c
+++ b/rcuhashbash-resize.c
@@ -124,27 +124,6 @@ static int rcuhashbash_read_rcu(u32 value, struct stats *stats)
return 0;
}
-static int rcuhashbash_read_thread(void *arg)
-{
- int err;
- struct stats *stats_ret = arg;
- struct stats stats = {};
- DEFINE_RCU_RANDOM(rand);
-
- set_user_nice(current, 19);
-
- do {
- cond_resched();
- err = ops->read(rcu_random(&rand) % entries, &stats);
- } while (!kthread_should_stop() && !err);
-
- *stats_ret = stats;
-
- while (!kthread_should_stop())
- schedule_timeout_interruptible(1);
- return err;
-}
-
static struct hlist_node **hlist_advance_last_next(struct hlist_node **old_last_next)
{
struct hlist_head h = { .first = *old_last_next };
@@ -252,6 +231,27 @@ static int rcuhashbash_resize(u8 new_buckets_shift, struct stats *stats)
return 0;
}
+static int rcuhashbash_read_thread(void *arg)
+{
+ int err;
+ struct stats *stats_ret = arg;
+ struct stats stats = {};
+ DEFINE_RCU_RANDOM(rand);
+
+ set_user_nice(current, 19);
+
+ do {
+ cond_resched();
+ err = ops->read(rcu_random(&rand) % entries, &stats);
+ } while (!kthread_should_stop() && !err);
+
+ *stats_ret = stats;
+
+ while (!kthread_should_stop())
+ schedule_timeout_interruptible(1);
+ return err;
+}
+
static int rcuhashbash_resize_thread(void *arg)
{
int err;