[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230511085836.579679-2-leobras@redhat.com>
Date: Thu, 11 May 2023 05:58:38 -0300
From: Leonardo Bras <leobras@...hat.com>
To: Jens Axboe <axboe@...nel.dk>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Valentin Schneider <vschneid@...hat.com>,
Juergen Gross <jgross@...e.com>,
Yury Norov <yury.norov@...il.com>,
Leonardo Bras <leobras@...hat.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/2] smp: Change signatures to use call_single_data_t
Every caller of smp_call_function_single_async() now makes use
of call_single_data_t, which is a size-aligned typedef of
struct __call_single_data.
Changing smp_call_function_single_async() csd parameter to
call_single_data_t makes possible to warn future callers if they
are using an unaligned csd, which can cause it to be split between 2
cachelines, which is usually bad for performance.
Also, for the same reason, change generic_exec_single().
Signed-off-by: Leonardo Bras <leobras@...hat.com>
---
kernel/smp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index ab3e5dad6cfe..919387be6d4e 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -361,7 +361,7 @@ void __smp_call_single_queue(int cpu, struct llist_node *node)
* for execution on the given CPU. data must already have
* ->func, ->info, and ->flags set.
*/
-static int generic_exec_single(int cpu, struct __call_single_data *csd)
+static int generic_exec_single(int cpu, call_single_data_t *csd)
{
if (cpu == smp_processor_id()) {
smp_call_func_t func = csd->func;
@@ -645,7 +645,7 @@ EXPORT_SYMBOL(smp_call_function_single);
*
* Return: %0 on success or negative errno value on error
*/
-int smp_call_function_single_async(int cpu, struct __call_single_data *csd)
+int smp_call_function_single_async(int cpu, call_single_data_t *csd)
{
int err = 0;
--
2.40.1
Powered by blists - more mailing lists