[Openib-windows] Using of fast mutexes in WinIb

Leonid Keller leonid at mellanox.co.il
Tue Nov 15 07:32:04 PST 2005


Hi Fab,
I come across the following problem: implementation of
cl_mutex_acquire() via Fast Mutexes causes all the code in critical
section to work at APC_LEVEL.

The first case i saw, was at the start-up of IpoIb driver, which takes
mutex in __ipoib_pnp_cb and makes all MTHCA driver control verbs to work
at APC_LEVEL, which is troublesome.
(e.g., create_cq calls AllocateCommonBuffer, which requires
PASSIVE_LEVEL).

There are several ways to solve the problem:
	1) Implement cl_mutex_acquire() via regular mutexes. It is a
general and secure, but a bit ineffective way. 
	2) Add to complib "regular mutexes" and use them in that
function. It's more effective, but then we need  to check/fix all other
uses of fast mutexes.
	3) Invent some other sync mechanism for that function. It lefts
the problem with fast mutexes in other functions.

What do you think ?



More information about the ofw mailing list