RE: [PATCH for-next v6] RDMA/rxe: Add workqueue support for tasks

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

 



On Fri, Mar 3, 2023 4:36 AM Bob Pearson wrote:
> 
> Replace tasklets by work queues for the three main rxe tasklets:
> rxe_requester, rxe_completer and rxe_responder.
> 
> This patch is all that is left from an earlier patch series that also
> converted tasklets to workqueues with the same subject.
> 
> With this patch the rxe driver does not exhibit the soft lockups
> reported by Daisuke Matsuda in the link below.
> 
> This patch depends on an earlier patch series titled "RDMA/rxe: Correct
> qp reference counting" which corrects the same errors for the current
> tasklet version.

Isn't it better to add the link to the patch series for easier reference?

> 
> Link:
> https://lore.kernel.org/linux-rdma/TYCPR01MB845522FD536170D75068DD41E5099@xxxxxxxxxxxxxxxxxxxxxxxxxxx.
> outlook.com/
> Signed-off-by: Ian Ziemba <ian.ziemba@xxxxxxx>
> Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx>
> ---
> v6:
>   Fixed left over references to tasklets in the comments.
>   Added WQ_UNBOUND to the parameters for alloc_workqueue(). This shows
>   a significant performance improvement.
> v5:
>   Based on corrected task logic for tasklets and simplified to only
>   convert from tasklets to workqueues and not provide a flexible
>   interface.
> 
>  drivers/infiniband/sw/rxe/rxe.c      |  9 ++-
>  drivers/infiniband/sw/rxe/rxe_task.c | 84 ++++++++++++++++++----------
>  drivers/infiniband/sw/rxe/rxe_task.h |  9 ++-
>  3 files changed, 69 insertions(+), 33 deletions(-)
> 

<...>

> diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h
> index facb7c8e3729..4e937de9ebcf 100644
> --- a/drivers/infiniband/sw/rxe/rxe_task.h
> +++ b/drivers/infiniband/sw/rxe/rxe_task.h
> @@ -22,23 +22,28 @@ enum {
>   * called again.
>   */
>  struct rxe_task {
> -	struct tasklet_struct	tasklet;
> +	struct work_struct	work;
>  	int			state;
>  	spinlock_t		lock;
>  	struct rxe_qp		*qp;
> +	const char		*name;
>  	int			(*func)(struct rxe_qp *qp);
>  	int			ret;
>  	long			num_sched;
>  	long			num_done;
>  };

The member '*name' is newly added here but not used elsewhere.
It seems we should just remove it.

> 
> +int rxe_alloc_wq(void);
> +
> +void rxe_destroy_wq(void);
> +
>  /*
>   * init rxe_task structure
>   *	qp  => parameter to pass to func
>   *	func => function to call until it returns != 0
>   */
>  int rxe_init_task(struct rxe_task *task, struct rxe_qp *qp,
> -		  int (*func)(struct rxe_qp *));
> +		  int (*func)(struct rxe_qp *), const char *name);

This does not matches with the function definition. Kernel build
fails here unless the 4th argument is removed. Additionally, the argument
"*name" is not used in rxe_init_task().

Thanks,
Daisuke

> 
>  /* cleanup task */
>  void rxe_cleanup_task(struct rxe_task *task);
> 
> base-commit: 6a22f7fbde87336002886583d053bfa1cd8ff1d1
> --
> 2.37.2





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux