Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

From: Steven Rostedt
Date: Mon Feb 12 2024 - 18:11:29 EST


On Mon, 12 Feb 2024 23:54:00 +0100
Mete Durlu <meted@xxxxxxxxxxxxx> wrote:

> On 2/12/24 19:53, Steven Rostedt wrote:
> >
> > Right, it will definitely force the race window to go away.
> >
> > Can you still trigger this issue with just Sven's patch and not this change?
> Sven's patch makes the test cases much more resilient. I needed to ramp
> up the load up to 4 stressors on a 4 core system before the test starts
> to fail again. At this point it is fair to say that the system is under
> significant load.
>
> The failing condition is now different, which tells me that
> Sven's patch have already solved(or improved) the previous issue.
> What is failing now:
>
> echo '** ENABLE TRACING'
> enable_tracing
>
> cnt=`cnt_trace`
> if [ $cnt -eq 0 ]; then
> fail "Nothing found in trace"
> fi
>
> Adding a sleep between enable_tracing and cnt_trace seems to improve the
> situation a lot. (my guess is that, the trace writer isn't getting any
> runtime before the test checks the trace output)
>
> echo '** ENABLE TRACING'
> enable_tracing
>
> +sleep $SLEEP_TIME
> cnt=`cnt_trace`
> if [ $cnt -eq 0 ]; then
> fail "Nothing found in trace"
> fi
>
> Didn't see any failure while increasing the system load until 8
> stressors (this might have been luck). When system was under load with
> 8 stressors, I have seen the test failing 2 out of 10 times. Definitely
> an improvement over the current situation.
>


So, I plan on adding Sven's patch for my next pull request to Linus. I had
forgotten it when I did my last one (largely due to traveling). I'll hold
off a week to see if any other fixes come in.

-- Steve