diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-05-23 10:29:42 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-18 03:21:22 +0200 |
commit | 98e77d9fd7dff05019436370e78c3ec0f9894e25 (patch) | |
tree | f7c8843608a3390d9e116a648b395c5067158b02 /drivers/infiniband/hw/mlx4/main.c | |
parent | IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMAC (diff) | |
download | linux-98e77d9fd7dff05019436370e78c3ec0f9894e25.tar.xz linux-98e77d9fd7dff05019436370e78c3ec0f9894e25.zip |
IB: Convert msleep below 20ms to usleep_range
The msleep(1) may do not sleep 1 ms as expected
and will sleep longer. The simple conversion from
msleep to usleep_range between 1ms and 2ms can solve an
issue.
The full and comprehensive explanation can be found at [1] and [2].
[1] https://lkml.org/lkml/2007/8/3/250
[2] Documentation/timers/timers-howto.txt
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/main.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 75b2f7d4cd95..d1b43cbbfea7 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -1155,7 +1155,7 @@ static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) * call to mlx4_ib_vma_close. */ put_task_struct(owning_process); - msleep(1); + usleep_range(1000, 2000); owning_process = get_pid_task(ibcontext->tgid, PIDTYPE_PID); if (!owning_process || |