From: "Håkon Bugge" <haakon.bugge@oracle.com>
To: jgg@mellanox.com, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, yishaih@mellanox.com,
jackm@dev.mellanox.co.il, ranro@mellanox.com
Subject: [PATCH for-rc v2 6/6] IB/mlx4: Adjust delayed work when a dup is observed
Date: Mon, 3 Aug 2020 08:19:41 +0200 [thread overview]
Message-ID: <20200803061941.1139994-7-haakon.bugge@oracle.com> (raw)
In-Reply-To: <20200803061941.1139994-1-haakon.bugge@oracle.com>
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")
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
---
drivers/infiniband/hw/mlx4/cm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
index b10737f74449..0ce4b5a3ffa7 100644
--- 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);
--
2.20.1
next prev parent reply other threads:[~2020-08-03 6:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 6:19 [PATCH for-rc v2 0/6] Add CM packets missing and harden the proxying Håkon Bugge
2020-08-03 6:19 ` [PATCH for-rc v2 1/6] IB/mlx4: Add and improve logging Håkon Bugge
2020-08-03 6:19 ` [PATCH for-rc v2 2/6] IB/mlx4: Add support for MRA Håkon Bugge
2020-08-03 6:19 ` [PATCH for-rc v2 3/6] IB/mlx4: Separate tunnel and wire bufs parameters Håkon Bugge
2020-08-03 6:19 ` [PATCH for-rc v2 4/6] IB/mlx4: Fix starvation in paravirt mux/demux Håkon Bugge
2020-08-03 6:19 ` [PATCH for-rc v2 5/6] IB/mlx4: Add support for REJ due to timeout Håkon Bugge
2020-08-03 6:19 ` Håkon Bugge [this message]
2020-08-10 11:20 ` [PATCH for-rc v2 0/6] Add CM packets missing and harden the proxying Håkon Bugge
2020-08-10 11:46 ` Leon Romanovsky
2020-08-10 14:10 ` Gal Pressman
2020-08-10 14:23 ` Leon Romanovsky
2020-08-24 16:36 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200803061941.1139994-7-haakon.bugge@oracle.com \
--to=haakon.bugge@oracle.com \
--cc=jackm@dev.mellanox.co.il \
--cc=jgg@mellanox.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=ranro@mellanox.com \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox