[openib-general] Re: RFC: revert module ref counting patches (was Re: [PATCH] ipoib_flush_paths)

Michael S. Tsirkin mst at mellanox.co.il
Mon Apr 10 11:11:04 PDT 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: RFC: revert module ref counting patches (was Re: [PATCH] ipoib_flush_paths)
> 
> Michael S. Tsirkin wrote:
> >Alternatively, we can go back to the original idea of adding API for 
> >flushing
> >WQs to ib_mad, ib_sa and ib_addr modules and calling that at module 
> >cleanup.
> 
> I've thought about this more, and it leads to very subtle dependencies 
> between modules.

No, its simple: A uses C -> A does flush C at unload.
B uses C -> B does flush C at unload.

> For example, suppose modules A and B both call into 
> module C, with module C performing callbacks into A and B.  For module A to 
> unload, it is now dependent on what module B does in its callback.  

This is always the case when both callbacks run form the same
workqueue.

> Interactions between A and C should be limited to A and C to avoid 
> potential deadlock conditions that could occur between unrelated modules.

I don't see how this adds dependencies that we don't already have. Witness the
recent ib_cma/sa deadlock - without flushes.

-- 
MST



More information about the general mailing list