Re: [PATCH v4 1/2] rtla: handle SIGTERM during a run

From: Tomas Glozar

Date: Mon Nov 30 2026 - 09:30:09 EST


On Sat, Nov 28, 2026 at 6:49 AM Chaosheng Qu <quchaosheng000406@xxxxxxx> wrote:
>
> That matches what the tree does now. osnoise_enable() starts the trace
> instances first and calls osn_set_stop() afterwards (osnoise.c; timerlat.c
> does the same before its own osn_set_stop()), so a stop_tracing_us left
> behind by an earlier run is already in effect when tracing starts. The new
> value is written too late to protect the run, which is the reset-on-start
> regression you described.
>
> So I agree on both counts: the SIGTERM part is not the fix for that, and the
> Fixes: tag goes. I would rather not send a v5 for a tag alone -- drop it
> when you apply the patch, or say the word and I will send v5 with the tag
> removed and the changelog pointing at c219d4ee1d6.
>

No problem, I will pick your patch just with the tag dropped :)

Note: for future patches, rtla should also use the tracing subsystem
convention of starting with an uppercase letter in the commit ("rtla:
Handle SIGTERM during a run"). I'll correct that for the current
patches as well.

> 2/2 is independent of that and can land on its own. If you want, I can add
> a case to it later that presets stop_tracing_us before the run and checks
> that rtla overrides it -- but that test only makes sense once your reset fix
> is in, so it would come after it.
>

I think it makes sense for me to include testing the stop_tracing_us
reset in the same patchset as the fix.

Regarding 2/2, I still need to review that properly. I'm thinking
about how to simplify the patch. I have in mind two things: for the
option cleanup, the existing helper reset_osnoise() might be reusable.
For the SIGTERM sending, the existing check() function might be
usable, with no duration and a timeout of e.g. 5 seconds, then
re-check (for dangling instances and restored options) afterward.

> Thanks,
> Chaosheng
>

Tomas