diff options
author | Gerd Rausch <gerd.rausch@oracle.com> | 2019-07-17 00:28:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-17 21:06:51 +0200 |
commit | 2c7da8e6b041a8df2661def81ac90c9c0c719909 (patch) | |
tree | 52734d4a773975166c4a839c3e8927d8f1c1f70e /net/rds/ib_mr.h | |
parent | net/sched: Make NET_ACT_CT depends on NF_NAT (diff) | |
download | linux-2c7da8e6b041a8df2661def81ac90c9c0c719909.tar.xz linux-2c7da8e6b041a8df2661def81ac90c9c0c719909.zip |
net/rds: Give fr_state a chance to transition to FRMR_IS_FREE
In the context of FRMR (ib_frmr.c):
Memory regions make it onto the "clean_list" via "rds_ib_flush_mr_pool",
after the memory region has been posted for invalidation via
"rds_ib_post_inv".
At that point in time, "fr_state" may still be in state "FRMR_IS_INUSE",
since the only place where "fr_state" transitions to "FRMR_IS_FREE"
is in "rds_ib_mr_cqe_handler", which is triggered by a tasklet.
So in case we notice that "fr_state != FRMR_IS_FREE" (see below),
we wait for "fr_inv_done" to trigger with a maximum of 10msec.
Then we check again, and only put the memory region onto the drop_list
(via "rds_ib_free_frmr") in case the situation remains unchanged.
This avoids the problem of memory-regions bouncing between "clean_list"
and "drop_list" before they even have a chance to be properly invalidated.
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/rds/ib_mr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/ib_mr.h b/net/rds/ib_mr.h index 5da12c248431..42daccb7b5eb 100644 --- a/net/rds/ib_mr.h +++ b/net/rds/ib_mr.h @@ -57,6 +57,7 @@ struct rds_ib_frmr { struct ib_mr *mr; enum rds_ib_fr_state fr_state; bool fr_inv; + wait_queue_head_t fr_inv_done; struct ib_send_wr fr_wr; unsigned int dma_npages; unsigned int sg_byte_len; |