Re: [PATCH net 2/2] net: hns3: add cond_resched() to hns3 ring buffer init process

From: Simon Horman
Date: Thu Jun 06 2024 - 12:27:24 EST


On Wed, Jun 05, 2024 at 03:20:58PM +0800, Jijie Shao wrote:
> From: Jie Wang <wangjie125@xxxxxxxxxx>
>
> Currently hns3 ring buffer init process would hold cpu too long with big
> Tx/Rx ring depth. This could cause soft lockup.
>
> So this patch adds cond_resched() to the process. Then cpu can break to
> run other tasks instead of busy looping.
>
> Fixes: a723fb8efe29 ("net: hns3: refine for set ring parameters")
> Signed-off-by: Jie Wang <wangjie125@xxxxxxxxxx>
> Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>