diff options
-rw-r--r-- | net/rds/ib_rdma.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index 3efdddc39d49..0017964f2fcf 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c | |||
@@ -38,6 +38,8 @@ | |||
38 | #include "ib.h" | 38 | #include "ib.h" |
39 | #include "xlist.h" | 39 | #include "xlist.h" |
40 | 40 | ||
41 | struct workqueue_struct *rds_ib_fmr_wq; | ||
42 | |||
41 | static DEFINE_PER_CPU(unsigned long, clean_list_grace); | 43 | static DEFINE_PER_CPU(unsigned long, clean_list_grace); |
42 | #define CLEAN_LIST_BUSY_BIT 0 | 44 | #define CLEAN_LIST_BUSY_BIT 0 |
43 | 45 | ||
@@ -304,6 +306,9 @@ static struct rds_ib_mr *rds_ib_alloc_fmr(struct rds_ib_device *rds_ibdev) | |||
304 | struct rds_ib_mr *ibmr = NULL; | 306 | struct rds_ib_mr *ibmr = NULL; |
305 | int err = 0, iter = 0; | 307 | int err = 0, iter = 0; |
306 | 308 | ||
309 | if (atomic_read(&pool->dirty_count) >= pool->max_items / 10) | ||
310 | queue_delayed_work(rds_ib_fmr_wq, &pool->flush_worker, 10); | ||
311 | |||
307 | while (1) { | 312 | while (1) { |
308 | ibmr = rds_ib_reuse_fmr(pool); | 313 | ibmr = rds_ib_reuse_fmr(pool); |
309 | if (ibmr) | 314 | if (ibmr) |
@@ -691,8 +696,6 @@ out_nolock: | |||
691 | return ret; | 696 | return ret; |
692 | } | 697 | } |
693 | 698 | ||
694 | struct workqueue_struct *rds_ib_fmr_wq; | ||
695 | |||
696 | int rds_ib_fmr_init(void) | 699 | int rds_ib_fmr_init(void) |
697 | { | 700 | { |
698 | rds_ib_fmr_wq = create_workqueue("rds_fmr_flushd"); | 701 | rds_ib_fmr_wq = create_workqueue("rds_fmr_flushd"); |