[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <986fee5c-8537-498f-83ec-65a7c7c7a71c@cs-soprasteria.com>
Date: Fri, 13 Dec 2024 07:27:03 +0000
From: LEROY Christophe <christophe.leroy2@...soprasteria.com>
To: Frederic Weisbecker <frederic@...nel.org>, LKML
<linux-kernel@...r.kernel.org>
CC: "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, Andrew Morton
<akpm@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>, Thomas
Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 06/19] soc/qman: test: Use kthread_run_on_cpu()
Le 11/12/2024 à 16:40, Frederic Weisbecker a écrit :
> Use the proper API instead of open coding it.
>
> However it looks like kthreads here could be replaced by the use of a
> per-cpu workqueue instead.
>
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
Acked-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
> drivers/soc/fsl/qbman/qman_test_stash.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c
> index b7e8e5ec884c..f4d3c2146f4f 100644
> --- a/drivers/soc/fsl/qbman/qman_test_stash.c
> +++ b/drivers/soc/fsl/qbman/qman_test_stash.c
> @@ -108,14 +108,12 @@ static int on_all_cpus(int (*fn)(void))
> .fn = fn,
> .started = ATOMIC_INIT(0)
> };
> - struct task_struct *k = kthread_create(bstrap_fn, &bstrap,
> - "hotpotato%d", cpu);
> + struct task_struct *k = kthread_run_on_cpu(bstrap_fn, &bstrap,
> + cpu, "hotpotato%d");
> int ret;
>
> if (IS_ERR(k))
> return -ENOMEM;
> - kthread_bind(k, cpu);
> - wake_up_process(k);
> /*
> * If we call kthread_stop() before the "wake up" has had an
> * effect, then the thread may exit with -EINTR without ever
Powered by blists - more mailing lists