[rds-devel] [git pull] IB device refcounting
Zach Brown
zach.brown at oracle.com
Wed Jun 2 12:09:37 PDT 2010
On May 25, 2010, at 5:25 PM, Andy Grover wrote:
> On 05/24/2010 01:38 PM, Zach Brown wrote:
>> RDS/IB: add refcount tracking to struct rds_ib_device
>
> Kernels earlier than 2.6.21 do not have cancel_work_sync. We need to create a backport patch. Is cancel_delayed_work/flush_workqueue a possible replacement for these earlier kernels?
Yeah, it looks like that's the way to go. Earlier flush_workqueue() notices when it's called in the work queue's thread and just runs the queue. Current kernels trip a WARN_ON in that case.
> If you can send me a patch, I can handle fitting it into OFED's backport system.
How's this look?
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -244,7 +244,7 @@ void rds_ib_get_mr_info(struct rds_ib_device *rds_ibdev, struct rds_info_rdma_co
void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *pool)
{
- cancel_work_sync(&pool->flush_worker);
+ cancel_rearming_delayed_workqueue(rds_wq, &pool->flush_worker);
rds_ib_flush_mr_pool(pool, 1);
WARN_ON(atomic_read(&pool->item_count));
WARN_ON(atomic_read(&pool->free_pinned));
More information about the rds-devel
mailing list