Commit f5333882 authored by Roy Novich's avatar Roy Novich Committed by sanglipeng
Browse files

net/mlx5: Allow async trigger completion execution on single CPU systems

stable inclusion
from stable-v5.10.155
commit eb6fa0ac2a9c14b700ee7a2bb55736a0bd14a099
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb6fa0ac2a9c14b700ee7a2bb55736a0bd14a099



--------------------------------

[ Upstream commit 2808b37b ]

For a single CPU system, the kernel thread executing mlx5_cmd_flush()
never releases the CPU but calls down_trylock(&cmd→sem) in a busy loop.
On a single processor system, this leads to a deadlock as the kernel
thread which executes mlx5_cmd_invoke() never gets scheduled. Fix this,
by adding the cond_resched() call to the loop, allow the command
completion kernel thread to execute.

Fixes: 8e715cd6 ("net/mlx5: Set command entry semaphore up once got index free")
Signed-off-by: default avatarAlexander Schmidt <alexschm@de.ibm.com>
Signed-off-by: default avatarRoy Novich <royno@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 28e6c9c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment