RE: [patch 002/146] RDMA/siw: make use of the helper function kthread_run_on_cpu()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Sent: Friday, 14 January 2022 23:03
> To: akpm@xxxxxxxxxxxxxxxxxxxx; Bernard Metzler <BMT@xxxxxxxxxxxxxx>;
> bristot@xxxxxxxxxx; caihuoqing@xxxxxxxxx; dave@xxxxxxxxxxxx;
> dledford@xxxxxxxxxx; jgg@xxxxxxxx; jiangshanlai@xxxxxxxxx;
> joel@xxxxxxxxxxxxxxxxx; josh@xxxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx;
> mathieu.desnoyers@xxxxxxxxxxxx; mingo@xxxxxxxxxx; mm-
> commits@xxxxxxxxxxxxxxx; paulmck@xxxxxxxxxx; rostedt@xxxxxxxxxxx;
> torvalds@xxxxxxxxxxxxxxxxxxxx
> Subject: [EXTERNAL] [patch 002/146] RDMA/siw: make use of the helper
> function kthread_run_on_cpu()
> 
> From: Cai Huoqing <caihuoqing@xxxxxxxxx>
> Subject: RDMA/siw: make use of the helper function kthread_run_on_cpu()
> 
> Replace kthread_create/kthread_bind/wake_up_process() with
> kthread_run_on_cpu() to simplify the code.
> 
> Link: INVALID URI REMOVED
> 3A__lkml.kernel.org_r_20211022025711.3673-2D3-2Dcaihuoqing-
> 40baidu.com&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2TaYXQ0T-
> r8ZO1PP1alNwU_QJcRRLfmYTAgd3QCvqSc&m=T1BlvlT0L-
> L5ZQY32ETtxzEwyFIAWcF0pGOthKHP_68&s=n4Cgq9aYj-341vdV-_8BZDAkCcFoRR-
> 7G1vpwblTuBE&e=
> Signed-off-by: Cai Huoqing <caihuoqing@xxxxxxxxx>
> Cc: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
> Cc: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
> Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>
> Cc: Doug Ledford <dledford@xxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Jason Gunthorpe <jgg@xxxxxxxx>
> Cc: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
> Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
> Cc: Lai Jiangshan <jiangshanlai@xxxxxxxxx>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
> Cc: "Paul E . McKenney" <paulmck@xxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> 
>  drivers/infiniband/sw/siw/siw_main.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> --- a/drivers/infiniband/sw/siw/siw_main.c~rdma-siw-make-use-of-the-
> helper-function-kthread_run_on_cpu
> +++ a/drivers/infiniband/sw/siw/siw_main.c
> @@ -98,15 +98,14 @@ static int siw_create_tx_threads(void)
>  			continue;
> 
>  		siw_tx_thread[cpu] =
> -			kthread_create(siw_run_sq, (unsigned long *)(long)cpu,
> -				       "siw_tx/%d", cpu);
> +			kthread_run_on_cpu(siw_run_sq,
> +					   (unsigned long *)(long)cpu,
> +					   cpu, "siw_tx/%u");
>  		if (IS_ERR(siw_tx_thread[cpu])) {
>  			siw_tx_thread[cpu] = NULL;
>  			continue;
>  		}
> -		kthread_bind(siw_tx_thread[cpu], cpu);
> 
> -		wake_up_process(siw_tx_thread[cpu]);
>  		assigned++;
>  	}
>  	return assigned;
> _

Thank you.

Reviewed-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux