|
@@ -30,12 +30,13 @@
|
|
|
#include <linux/smpboot.h>
|
|
|
#include "../time/tick-internal.h"
|
|
|
|
|
|
-#define RCU_KTHREAD_PRIO 1
|
|
|
-
|
|
|
#ifdef CONFIG_RCU_BOOST
|
|
|
|
|
|
#include "../locking/rtmutex_common.h"
|
|
|
-#define RCU_BOOST_PRIO CONFIG_RCU_BOOST_PRIO
|
|
|
+
|
|
|
+/* rcuc/rcub kthread realtime priority */
|
|
|
+static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO;
|
|
|
+module_param(kthread_prio, int, 0644);
|
|
|
|
|
|
/*
|
|
|
* Control variables for per-CPU and per-rcu_node kthreads. These
|
|
@@ -46,11 +47,7 @@ DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_status);
|
|
|
DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);
|
|
|
DEFINE_PER_CPU(char, rcu_cpu_has_work);
|
|
|
|
|
|
-#else /* #ifdef CONFIG_RCU_BOOST */
|
|
|
-
|
|
|
-#define RCU_BOOST_PRIO RCU_KTHREAD_PRIO
|
|
|
-
|
|
|
-#endif /* #else #ifdef CONFIG_RCU_BOOST */
|
|
|
+#endif /* #ifdef CONFIG_RCU_BOOST */
|
|
|
|
|
|
#ifdef CONFIG_RCU_NOCB_CPU
|
|
|
static cpumask_var_t rcu_nocb_mask; /* CPUs to have callbacks offloaded. */
|
|
@@ -98,6 +95,9 @@ static void __init rcu_bootup_announce_oddness(void)
|
|
|
pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf);
|
|
|
if (nr_cpu_ids != NR_CPUS)
|
|
|
pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%d.\n", NR_CPUS, nr_cpu_ids);
|
|
|
+#ifdef CONFIG_RCU_BOOST
|
|
|
+ pr_info("\tRCU kthread priority: %d.\n", kthread_prio);
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_TREE_PREEMPT_RCU
|
|
@@ -1339,7 +1339,7 @@ static int rcu_spawn_one_boost_kthread(struct rcu_state *rsp,
|
|
|
smp_mb__after_unlock_lock();
|
|
|
rnp->boost_kthread_task = t;
|
|
|
raw_spin_unlock_irqrestore(&rnp->lock, flags);
|
|
|
- sp.sched_priority = RCU_BOOST_PRIO;
|
|
|
+ sp.sched_priority = kthread_prio;
|
|
|
sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
|
|
|
wake_up_process(t); /* get to TASK_INTERRUPTIBLE quickly. */
|
|
|
return 0;
|
|
@@ -1356,7 +1356,7 @@ static void rcu_cpu_kthread_setup(unsigned int cpu)
|
|
|
{
|
|
|
struct sched_param sp;
|
|
|
|
|
|
- sp.sched_priority = RCU_KTHREAD_PRIO;
|
|
|
+ sp.sched_priority = kthread_prio;
|
|
|
sched_setscheduler_nocheck(current, SCHED_FIFO, &sp);
|
|
|
}
|
|
|
|