Re: [PATCH 0/5] rtla/timerlat: Stop on signal properly when overloaded

From: Steven Rostedt
Date: Thu Jan 16 2025 - 19:46:24 EST


On Thu, 16 Jan 2025 15:49:26 +0100
Tomas Glozar <tglozar@xxxxxxxxxx> wrote:

> In the future, two more patchsets will be sent: one to display how many
> events/samples were dropped (either left in tracefs buffer or by buffer
> overflow), one to improve sample processing performance to be on par with
> cyclictest (ideally) so that samples are not dropped in the cases mentioned
> in the beginning of the email.

Hmm, I wonder if timerlat can handle per cpu data, then you could kick off
a thread per CPU (or a set of CPUs) where the thread is responsible for
handling the data.


CPU_ZERO_S(cpu_size, cpusetp);
CPU_SET_S(cpu, cpu_size, cpusetp);
retval = tracefs_iterate_raw_events(trace->tep,
trace->inst,
cpusetp,
cpu_size,
collect_registered_events,
trace);

And then that iteration will only read over a subset of CPUs. Each thread
can do a different subset and then it should be able to keep up.

-- Steve