Merge tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / kernel / rcu / rcuperf.c
index ec903d7..21448d3 100644 (file)
@@ -361,7 +361,6 @@ rcu_perf_writer(void *arg)
        int i_max;
        long me = (long)arg;
        struct rcu_head *rhp = NULL;
-       struct sched_param sp;
        bool started = false, done = false, alldone = false;
        u64 t;
        u64 *wdp;
@@ -370,8 +369,7 @@ rcu_perf_writer(void *arg)
        VERBOSE_PERFOUT_STRING("rcu_perf_writer task started");
        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);
+       sched_set_fifo_low(current);
 
        if (holdoff)
                schedule_timeout_uninterruptible(holdoff * HZ);
@@ -427,9 +425,7 @@ retry:
                        started = true;
                if (!done && i >= MIN_MEAS) {
                        done = true;
-                       sp.sched_priority = 0;
-                       sched_setscheduler_nocheck(current,
-                                                  SCHED_NORMAL, &sp);
+                       sched_set_normal(current, 0);
                        pr_alert("%s%s rcu_perf_writer %ld has %d measurements\n",
                                 perf_type, PERF_FLAG, me, MIN_MEAS);
                        if (atomic_inc_return(&n_rcu_perf_writer_finished) >=