Skip to content

Commit b143339

Browse files
author
Peter Zijlstra
committed
sched,rcuperf: Convert to sched_set_fifo_low()
Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: [email protected] Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Reviewed-by: Paul E. McKenney <[email protected]>
1 parent 93db912 commit b143339

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

kernel/rcu/rcuperf.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ rcu_perf_writer(void *arg)
354354
int i_max;
355355
long me = (long)arg;
356356
struct rcu_head *rhp = NULL;
357-
struct sched_param sp;
358357
bool started = false, done = false, alldone = false;
359358
u64 t;
360359
u64 *wdp;
@@ -363,8 +362,7 @@ rcu_perf_writer(void *arg)
363362
VERBOSE_PERFOUT_STRING("rcu_perf_writer task started");
364363
WARN_ON(!wdpp);
365364
set_cpus_allowed_ptr(current, cpumask_of(me % nr_cpu_ids));
366-
sp.sched_priority = 1;
367-
sched_setscheduler_nocheck(current, SCHED_FIFO, &sp);
365+
sched_set_fifo_low(current);
368366

369367
if (holdoff)
370368
schedule_timeout_uninterruptible(holdoff * HZ);
@@ -420,9 +418,7 @@ rcu_perf_writer(void *arg)
420418
started = true;
421419
if (!done && i >= MIN_MEAS) {
422420
done = true;
423-
sp.sched_priority = 0;
424-
sched_setscheduler_nocheck(current,
425-
SCHED_NORMAL, &sp);
421+
sched_set_normal(current, 0);
426422
pr_alert("%s%s rcu_perf_writer %ld has %d measurements\n",
427423
perf_type, PERF_FLAG, me, MIN_MEAS);
428424
if (atomic_inc_return(&n_rcu_perf_writer_finished) >=

0 commit comments

Comments
 (0)