[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tuk5a4yk.mognet@arm.com>
Date: Wed, 04 Aug 2021 11:18:11 +0100
From: Valentin Schneider <valentin.schneider@....com>
To: paulmck@...nel.org
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
linux-rt-users@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Davidlohr Bueso <dave@...olabs.net>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 2/2] rcutorture: Nudge ksoftirqd priority for RCU boost testing
On 03/08/21 16:42, Paul E. McKenney wrote:
> On Tue, Aug 03, 2021 at 11:54:37PM +0100, Valentin Schneider wrote:
>> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
>> index 680f66b65f14..3dd5fa75f469 100644
>> --- a/kernel/rcu/rcutorture.c
>> +++ b/kernel/rcu/rcutorture.c
>> @@ -948,12 +948,26 @@ static int rcu_torture_boost(void *arg)
>> unsigned long endtime;
>> unsigned long oldstarttime;
>> struct rcu_boost_inflight rbi = { .inflight = 0 };
>> + struct task_struct *ksoftirqd = this_cpu_ksoftirqd();
>>
>> VERBOSE_TOROUT_STRING("rcu_torture_boost started");
>>
>> /* Set real-time priority. */
>> sched_set_fifo_low(current);
>>
>> + /*
>> + * Boost testing requires TIMER_SOFTIRQ to run at a higher priority
>> + * than the CPU-hogging torture kthreads, otherwise said threads
>> + * will never let timer expiry for the RCU GP kthread happen, which will
>> + * prevent any boosting.
>> + */
>> + if (current->normal_prio < ksoftirqd->normal_prio) {
>
> Would it make sense to add IS_ENABLED(CONFIG_PREEMPT_RT) to the above
> condition?
>
Hm so v5.13-rt1 has this commit:
5e59fba573e6 ("rcutorture: Fix testing of RCU priority boosting")
which gates RCU boost torture testing under CONFIG_PREEMPT_RT. Now, AFAICT
the TIMER_SOFTIRQ priority problem is there regardless of
CONFIG_PREEMPT_RT, so this patch would (should?) make sense even on
!CONFIG_PREEMPT_RT.
> Thanx, Paul
>
>> + struct sched_param sp = { .sched_priority = 2 };
>> +
>> + pr_alert("%s(): Adjusting %s priority\n", __func__, ksoftirqd->comm);
>> + sched_setscheduler_nocheck(ksoftirqd, SCHED_FIFO, &sp);
>> + }
>> +
>> init_rcu_head_on_stack(&rbi.rcu);
>> /* Each pass through the following loop does one boost-test cycle. */
>> do {
>> --
>> 2.25.1
>>
Powered by blists - more mailing lists