RDMA/rxe: Limit the number of calls to each tasklet
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 30 Jun 2022 19:04:25 +0000 (14:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:37 +0000 (11:40 +0200)
commitfda4bff43bcdb2faf56722d6bb9a996e1dcea2e1
tree0b822702c6efec2cadf7af2b62815c3843554f16
parent54aa6c49361b79f7f6b15fc63dfe9ea52c70bb03
RDMA/rxe: Limit the number of calls to each tasklet

[ Upstream commit eff6d998ca297cb0b2e53b032a56cf8e04dd8b17 ]

Limit the maximum number of calls to each tasklet from rxe_do_task()
before yielding the cpu. When the limit is reached reschedule the tasklet
and exit the calling loop. This patch prevents one tasklet from consuming
100% of a cpu core and causing a deadlock or soft lockup.

Link: https://lore.kernel.org/r/20220630190425.2251-9-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_param.h
drivers/infiniband/sw/rxe/rxe_task.c