Thread (48 messages) 48 messages, 4 authors, 2025-09-12

Re: [PATCH v6 03/24] tracing: Introduce trace remotes

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-09-09 13:38:06
Also in: kvmarm, linux-arm-kernel, lkml

On Tue, 9 Sep 2025 13:08:28 +0100
Vincent Donnefort [off-list ref] wrote:
quoted
quoted
+		rb_desc = __next_ring_buffer_desc(rb_desc);  
Is there no check to make sure that the cpu mask matches what the rb_desc
will have?  
The function is filling rb_desc[], based on the cpumask input, so both will
match when returning from this function.
It is then easy to handle the case where some CPUs are not part of the cpumask.
See remote_test_load() where for_each_ring_buffer_desc() iterates over all the
CPUs from the trace_desc but uses rb_desc->cpu.

Is it what you meant?
I'm more worried about the allocation not being big enough for the rb_desc
being filled. I just noticed that the trace_remote_register() function is
missing a kerneldoc header. Please add one and specify what the parameters
are for as well as their requirements.

It's fine to state that the allocation of desc must match what the cpumask
is. But the lack of comments about what the function does and what is
expected of the parameters makes it hard to know if it is performing
properly.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help