rcutorture: Set rcuperf writer kthreads to real-time priority
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 12 Jan 2016 23:17:21 +0000 (15:17 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 31 Mar 2016 20:37:39 +0000 (13:37 -0700)
This commit forces more deterministic update-side behavior by setting
rcuperf's rcu_perf_writer() kthreads to real-time priority.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcuperf.c

index 7a1edf417d187d1df58042768d99dfe6bb55f4ce..e18d016a98886f3c4eb170b5495ad0ba08bc3f66 100644 (file)
@@ -355,6 +355,7 @@ rcu_perf_writer(void *arg)
        int i = 0;
        int i_max;
        long me = (long)arg;
+       struct sched_param sp;
        bool started = false, done = false, alldone = false;
        u64 t;
        u64 *wdp;
@@ -365,6 +366,8 @@ rcu_perf_writer(void *arg)
        WARN_ON(rcu_gp_is_normal() && gp_exp);
        WARN_ON(!wdpp);
        set_cpus_allowed_ptr(current, cpumask_of(me % nr_cpu_ids));
+       sp.sched_priority = 1;
+       sched_setscheduler_nocheck(current, SCHED_FIFO, &sp);
        t = ktime_get_mono_fast_ns();
        if (atomic_inc_return(&n_rcu_perf_writer_started) >= nrealwriters) {
                t_rcu_perf_writer_started = t;