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

From: Sven Schnelle
Date: Wed Feb 07 2024 - 00:51:21 EST


Hi Steven,

Steven Rostedt <rostedt@xxxxxxxxxxx> writes:

> On Tue, 06 Feb 2024 09:48:16 +0100
> Sven Schnelle <svens@xxxxxxxxxxxxx> wrote:
>
>> I added some logging, and the test is not triggering this issue. So i
>> assume the default of 128 cmdline entries is just to small. Sorry for
>> the noise. Lets see whether we're still triggering some failures with
>> the other fix applied in CI. If we do, maybe we want to increase the
>> saved_cmdline_size for the ftrace test suite.
>
> I wonder if it is a good idea to increase the size when tracing starts,
> like the ring buffer expanding code. Maybe to 1024? Or is that still
> too small?

Not sure whether that is enough, have to test. However, it's not really
a fix, it would just require a bit more load and the test would fail
again. The fundamental problem is that even after disabling tracing
there might be some tracing line added due to the lockless nature of
the ringbuffer. This might then replace some existing cmdline entry.
So maybe we should change the test to ignore the program name when
calculating the checksums.