projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
227a0e1
)
IB/mlx4: Adjust delayed work when a dup is observed
author
Håkon Bugge
<haakon.bugge@oracle.com>
Mon, 3 Aug 2020 06:19:41 +0000
(08:19 +0200)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Mon, 24 Aug 2020 14:31:22 +0000
(11:31 -0300)
When scheduling delayed work to clean up the cache, if the entry already
has been scheduled for deletion, we adjust the delay.
Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization")
Link:
https://lore.kernel.org/r/20200803061941.1139994-7-haakon.bugge@oracle.com
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx4/cm.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx4/cm.c
b/drivers/infiniband/hw/mlx4/cm.c
index b10737f74449b354edb2ffc9636101adc5f4f6f7..0ce4b5a3ffa76e1682b065b29e4717cfb6bd7f53 100644
(file)
--- a/
drivers/infiniband/hw/mlx4/cm.c
+++ b/
drivers/infiniband/hw/mlx4/cm.c
@@
-291,6
+291,9
@@
static void schedule_delayed(struct ib_device *ibdev, struct id_map_entry *id)
if (!sriov->is_going_down && !id->scheduled_delete) {
id->scheduled_delete = 1;
schedule_delayed_work(&id->timeout, CM_CLEANUP_CACHE_TIMEOUT);
+ } else if (id->scheduled_delete) {
+ /* Adjust timeout if already scheduled */
+ mod_delayed_work(system_wq, &id->timeout, CM_CLEANUP_CACHE_TIMEOUT);
}
spin_unlock_irqrestore(&sriov->going_down_lock, flags);
spin_unlock(&sriov->id_map_lock);