mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] CSD-lock updates for v7.3
@ 2026-07-16  0:44 Paul E. McKenney
  2026-07-16  0:45 ` [PATCH 1/2] smp: Avoid invalid per-CPU CSD lookup with CSD lock debug Paul E. McKenney
  2026-07-16  0:45 ` [PATCH 2/2] smp: Make CSD lock acquisition atomic for debug mode Paul E. McKenney
  0 siblings, 2 replies; 6+ messages in thread
From: Paul E. McKenney @ 2026-07-16  0:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Chuyi Zhou, Ulf Hansson, Muchun Song,
	Joel Fernandes, Marco Crivellari, Rafael J. Wysocki

Hello!

This series provides CSD-lock diagnostic updates for v7.3:

1.	Avoid invalid per-CPU CSD lookup with CSD lock debug, courtesy
	of Chuyi Zhou.

2.	Make CSD lock acquisition atomic for debug mode, courtesy of
	Chuyi Zhou.

						Thanx, Paul

------------------------------------------------------------------------

 b/kernel/smp.c |    3 ++-
 kernel/smp.c   |   26 ++++++++++++++++++++++----
 2 files changed, 24 insertions(+), 5 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/2] smp: Fix CSD lock debug regressions
@ 2026-06-08 11:23 Chuyi Zhou
  2026-06-08 11:23 ` [PATCH 1/2] smp: Avoid invalid per-CPU CSD lookup with CSD lock debug Chuyi Zhou
  0 siblings, 1 reply; 6+ messages in thread
From: Chuyi Zhou @ 2026-06-08 11:23 UTC (permalink / raw)
  To: tglx, mingo, luto, peterz, paulmck, muchun.song; +Cc: linux-kernel, Chuyi Zhou

This series fixes two regressions introduced by commit b0473dcd4b1d
("smp: Improve smp_call_function_single() CSD-lock diagnostics").

That commit made smp_call_function_single() use the destination CPU's
csd_data while CSD lock debugging is enabled.  This improves diagnostics,
but it changes two assumptions that the existing code relied on.

The first patch keeps invalid CPU numbers from being used for the
destination CPU csd_data lookup before generic_exec_single() has a chance
to reject them.  This preserves the existing -ENXIO path for callers such
as smp_call_function_any() when no online CPU can be selected.

The second patch makes csd_lock() acquire CSD_FLAG_LOCK atomically in the
debug configuration.  With destination CPU csd_data, multiple remote CPUs
can concurrently send async calls to the same target CPU and therefore
contend for the same CSD object.  The old non-atomic wait-then-set sequence
can let two senders enqueue the same llist node, corrupting
call_single_queue and leaving later synchronous callbacks stuck behind it.

The non-debug fast path keeps the existing wait-then-set sequence.

Chuyi Zhou (2):
  smp: Avoid invalid per-CPU CSD lookup with CSD lock debug
  smp: Make CSD lock acquisition atomic for debug mode

 kernel/smp.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-22 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16  0:44 [PATCH 0/2] CSD-lock updates for v7.3 Paul E. McKenney
2026-07-16  0:45 ` [PATCH 1/2] smp: Avoid invalid per-CPU CSD lookup with CSD lock debug Paul E. McKenney
2026-07-22 18:58   ` [tip: smp/urgent] " tip-bot2 for Chuyi Zhou
2026-07-16  0:45 ` [PATCH 2/2] smp: Make CSD lock acquisition atomic for debug mode Paul E. McKenney
2026-07-22 18:58   ` [tip: smp/urgent] " tip-bot2 for Chuyi Zhou
  -- strict thread matches above, loose matches on Subject: below --
2026-06-08 11:23 [PATCH 0/2] smp: Fix CSD lock debug regressions Chuyi Zhou
2026-06-08 11:23 ` [PATCH 1/2] smp: Avoid invalid per-CPU CSD lookup with CSD lock debug Chuyi Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®