Re: [PATCH] tracing/osnoise: Force quiescent states while tracing

From: Nicolas Saenz Julienne
Date: Fri Mar 04 2022 - 09:37:08 EST


On Fri, 2022-03-04 at 15:28 +0100, Daniel Bristot de Oliveira wrote:
> On 2/28/22 15:14, Nicolas Saenz Julienne wrote:
> > At the moment running osnoise on an isolated CPU and a PREEMPT_RCU
> > kernel might have the side effect of extending grace periods too much.
> > This will eventually entice RCU to schedule a task on the isolated CPU
> > to end the overly extended grace period, adding unwarranted noise to the
> > CPU being traced in the process.
> >
> > So, check if we're the only ones running on this isolated CPU and that
> > we're on a PREEMPT_RCU setup. If so, let's force quiescent states in
> > between measurements.
> >
> > Non-PREEMPT_RCU setups don't need to worry about this as osnoise main
> > loop's cond_resched() will go though a quiescent state for them.
> >
> > Note that this same exact problem is what extended quiescent states were
> > created for. But adapting them to this specific use-case isn't trivial
> > as it'll imply reworking entry/exit and dynticks/context tracking code.
>
> Hey Nicolas,
>
> While testing this patch with rtla osnoise on the 5.17.0-rc6-rt10+, when I hit
> ^c on osnoise top, the system freezes :-/.
>
> Could you try that on your system?

Yes of course, I'll get a build going.

Were you using nohz_full?

--
Nicolás Sáenz