Re: [PATCH v5 12/26] riscv: Remove COMMAND_LINE_SIZE from uapi

2023-03-07 Thread Palmer Dabbelt
On Mon, 06 Mar 2023 02:04:54 PST (-0800), alexgh...@rivosinc.com wrote: As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Alexandre Ghiti --- arch/riscv/include/asm/setup.h | 7 +++ arch/riscv/include/uapi/asm/setup.

[PATCH v5 7/7] sched, smp: Trace smp callback causing an IPI

2023-03-07 Thread Valentin Schneider
Context === The newly-introduced ipi_send_cpumask tracepoint has a "callback" parameter which so far has only been fed with NULL. While CSD_TYPE_SYNC/ASYNC and CSD_TYPE_IRQ_WORK share a similar backing struct layout (meaning their callback func can be accessed without caring about the actual

[PATCH v5 6/7] smp: reword smp call IPI comment

2023-03-07 Thread Valentin Schneider
Accessing the call_single_queue hasn't involved a spinlock since 2014: 6897fc22ea01 ("kernel: use lockless list for smp_call_function_single") The llist operations (namely cmpxchg() and xchg()) provide similar ordering guarantees, update the comment to lessen confusion. Signed-off-by: Valentin

[PATCH v5 5/7] treewide: Trace IPIs sent via smp_send_reschedule()

2023-03-07 Thread Valentin Schneider
To be able to trace invocations of smp_send_reschedule(), rename the arch-specific definitions of it to arch_smp_send_reschedule() and wrap it into an smp_send_reschedule() that contains a tracepoint. Changes to include the declaration of the tracepoint were driven by the following coccinelle scri

[PATCH v5 4/7] irq_work: Trace self-IPIs sent via arch_irq_work_raise()

2023-03-07 Thread Valentin Schneider
IPIs sent to remote CPUs via irq_work_queue_on() are now covered by trace_ipi_send_cpumask(), add another instance of the tracepoint to cover self-IPIs. Signed-off-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) --- kernel/irq_work.c | 14 +- 1 file changed, 13 insertion

[PATCH v5 2/7] sched, smp: Trace IPIs sent via send_call_function_single_ipi()

2023-03-07 Thread Valentin Schneider
send_call_function_single_ipi() is the thing that sends IPIs at the bottom of smp_call_function*() via either generic_exec_single() or smp_call_function_many_cond(). Give it an IPI-related tracepoint. Note that this ends up tracing any IPI sent via __smp_call_single_queue(), which covers __ttwu_qu

[PATCH v5 3/7] smp: Trace IPIs sent via arch_send_call_function_ipi_mask()

2023-03-07 Thread Valentin Schneider
This simply wraps around the arch function and prepends it with a tracepoint, similar to send_call_function_single_ipi(). Signed-off-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) --- kernel/smp.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/sm

[PATCH v5 1/7] trace: Add trace_ipi_send_cpumask()

2023-03-07 Thread Valentin Schneider
trace_ipi_raise() is unsuitable for generically tracing IPI sources due to its "reason" argument being an uninformative string (on arm64 all you get is "Function call interrupts" for SMP calls). Add a variant of it that exports a target cpumask, a callsite and a callback. Signed-off-by: Valentin

[PATCH v5 0/7] Generic IPI sending tracepoint

2023-03-07 Thread Valentin Schneider
Background == Detecting IPI *reception* is relatively easy, e.g. using trace_irq_handler_{entry,exit} or even just function-trace flush_smp_call_function_queue() for SMP calls. Figuring out their *origin*, is trickier as there is no generic tracepoint tied to e.g. smp_call_function():

Re: [PATCH 1/2] ARC: Add the clone3 wrapper

2023-03-07 Thread Adhemerval Zanella Netto
On 02/03/23 13:10, Pavel Kozlov via Libc-alpha wrote: > From: Pavel Kozlov > > Use the clone3 wrapper on ARC. It doesn't care about stack alignment. > All callers should provide an aligned stack. > It follows the internal signature: > > extern int clone3 (struct clone_args *__cl_args, size_t

Re: [PATCH 2/2] ARC: run child from the separate start block in __clone

2023-03-07 Thread Adhemerval Zanella Netto
On 02/03/23 13:10, Pavel Kozlov via Libc-alpha wrote: > From: Pavel Kozlov > > For better debug experience use separate code block with extra > cfi_* directives to run child (same as in __clone3). LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > sysdeps/unix/sysv/linux/arc/clone.S |