Skip to content

Commit f20730e

Browse files
committed
Merge tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull SMP cross-CPU function-call updates from Ingo Molnar: - Remove diagnostics and adjust config for CSD lock diagnostics - Add a generic IPI-sending tracepoint, as currently there's no easy way to instrument IPI origins: it's arch dependent and for some major architectures it's not even consistently available. * tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: trace,smp: Trace all smp_function_call*() invocations trace: Add trace_ipi_send_cpu() sched, smp: Trace smp callback causing an IPI smp: reword smp call IPI comment treewide: Trace IPIs sent via smp_send_reschedule() irq_work: Trace self-IPIs sent via arch_irq_work_raise() smp: Trace IPIs sent via arch_send_call_function_ipi_mask() sched, smp: Trace IPIs sent via send_call_function_single_ipi() trace: Add trace_ipi_send_cpumask() kernel/smp: Make csdlock_debug= resettable locking/csd_lock: Remove per-CPU data indirection from CSD lock debugging locking/csd_lock: Remove added data from CSD lock debugging locking/csd_lock: Add Kconfig option for csd_debug default
2 parents 586b222 + 5c31249 commit f20730e

33 files changed

Lines changed: 217 additions & 281 deletions

File tree

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -912,15 +912,14 @@
912912
cs89x0_media= [HW,NET]
913913
Format: { rj45 | aui | bnc }
914914

915-
csdlock_debug= [KNL] Enable debug add-ons of cross-CPU function call
916-
handling. When switched on, additional debug data is
917-
printed to the console in case a hanging CPU is
918-
detected, and that CPU is pinged again in order to try
919-
to resolve the hang situation.
920-
0: disable csdlock debugging (default)
921-
1: enable basic csdlock debugging (minor impact)
922-
ext: enable extended csdlock debugging (more impact,
923-
but more data)
915+
csdlock_debug= [KNL] Enable or disable debug add-ons of cross-CPU
916+
function call handling. When switched on,
917+
additional debug data is printed to the console
918+
in case a hanging CPU is detected, and that
919+
CPU is pinged again in order to try to resolve
920+
the hang situation. The default value of this
921+
option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT
922+
Kconfig option.
924923

925924
dasd= [HW,NET]
926925
See header of drivers/s390/block/dasd_devmap.c.

arch/alpha/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ handle_ipi(struct pt_regs *regs)
562562
}
563563

564564
void
565-
smp_send_reschedule(int cpu)
565+
arch_smp_send_reschedule(int cpu)
566566
{
567567
#ifdef DEBUG_IPI_MSG
568568
if (cpu == hard_smp_processor_id())

arch/arc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static void ipi_send_msg(const struct cpumask *callmap, enum ipi_msg_type msg)
292292
ipi_send_msg_one(cpu, msg);
293293
}
294294

295-
void smp_send_reschedule(int cpu)
295+
void arch_smp_send_reschedule(int cpu)
296296
{
297297
ipi_send_msg_one(cpu, IPI_RESCHEDULE);
298298
}

arch/arm/kernel/smp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#include <asm/mach/arch.h>
4949
#include <asm/mpu.h>
5050

51-
#define CREATE_TRACE_POINTS
5251
#include <trace/events/ipi.h>
5352

5453
/*
@@ -749,7 +748,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
749748
ipi_setup(smp_processor_id());
750749
}
751750

752-
void smp_send_reschedule(int cpu)
751+
void arch_smp_send_reschedule(int cpu)
753752
{
754753
smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
755754
}

arch/arm/mach-actions/platsmp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <asm/smp_plat.h>
2121
#include <asm/smp_scu.h>
2222

23+
#include <trace/events/ipi.h>
24+
2325
#define OWL_CPU1_ADDR 0x50
2426
#define OWL_CPU1_FLAG 0x5c
2527

arch/arm64/kernel/smp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#include <asm/ptrace.h>
5252
#include <asm/virt.h>
5353

54-
#define CREATE_TRACE_POINTS
5554
#include <trace/events/ipi.h>
5655

5756
DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number);
@@ -979,7 +978,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
979978
ipi_setup(smp_processor_id());
980979
}
981980

982-
void smp_send_reschedule(int cpu)
981+
void arch_smp_send_reschedule(int cpu)
983982
{
984983
smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
985984
}

arch/csky/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void smp_send_stop(void)
140140
on_each_cpu(ipi_stop, NULL, 1);
141141
}
142142

143-
void smp_send_reschedule(int cpu)
143+
void arch_smp_send_reschedule(int cpu)
144144
{
145145
send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
146146
}

arch/hexagon/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
217217
}
218218
}
219219

220-
void smp_send_reschedule(int cpu)
220+
void arch_smp_send_reschedule(int cpu)
221221
{
222222
send_ipi(cpumask_of(cpu), IPI_RESCHEDULE);
223223
}

arch/ia64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ kdump_smp_send_init(void)
220220
* Called with preemption disabled.
221221
*/
222222
void
223-
smp_send_reschedule (int cpu)
223+
arch_smp_send_reschedule (int cpu)
224224
{
225225
ia64_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
226226
}
227-
EXPORT_SYMBOL_GPL(smp_send_reschedule);
227+
EXPORT_SYMBOL_GPL(arch_smp_send_reschedule);
228228

229229
/*
230230
* Called with preemption disabled.

arch/loongarch/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ void loongson_send_ipi_mask(const struct cpumask *mask, unsigned int action)
155155
* it goes straight through and wastes no time serializing
156156
* anything. Worst case is that we lose a reschedule ...
157157
*/
158-
void smp_send_reschedule(int cpu)
158+
void arch_smp_send_reschedule(int cpu)
159159
{
160160
loongson_send_ipi_single(cpu, SMP_RESCHEDULE);
161161
}
162-
EXPORT_SYMBOL_GPL(smp_send_reschedule);
162+
EXPORT_SYMBOL_GPL(arch_smp_send_reschedule);
163163

164164
irqreturn_t loongson_ipi_interrupt(int irq, void *dev)
165165
{

0 commit comments

Comments
 (0)