smp: Change function signatures to use call_single_data_t
authorLeonardo Bras <leobras@redhat.com>
Thu, 31 Aug 2023 06:31:28 +0000 (03:31 -0300)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Sep 2023 12:59:24 +0000 (14:59 +0200)
commitd090ec0df81e56556af3a2bf04a7e89347ae5784
tree40109dfc9f7a33202c71c0371cdf0ee58e2819c6
parente0a99a839f04c90bf9f16919997c4b34f9c8f1f0
smp: Change function signatures to use call_single_data_t

call_single_data_t is a size-aligned typedef of struct __call_single_data.

This alignment is desirable in order to have smp_call_function*() avoid
bouncing an extra cacheline in case of an unaligned csd, given this
would hurt performance.

Since the removal of struct request->csd in commit 660e802c76c8
("blk-mq: use percpu csd to remote complete instead of per-rq csd") there
are no current users of smp_call_function*() with unaligned csd.

Change every 'struct __call_single_data' function parameter to
'call_single_data_t', so we have warnings if any new code tries to
introduce an smp_call_function*() call with unaligned csd.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230831063129.335425-1-leobras@redhat.com
include/linux/smp.h
include/trace/events/csd.h
kernel/smp.c
kernel/up.c