[openib-general] Re: [PATCH] libibverbs: protect device list initialization

Roland Dreier rolandd at cisco.com
Wed Nov 9 09:14:58 PST 2005


> The following patch solves a problem I'm seeing when multiple
> threads try to call ibv_get_devices at the same time.

Looks good, thanks.

> Which brings me to another issue: our code examples call non-reentrant
> dlist_for_each variants of dlist scanning routines, which will
> create strange problems for multi-threaded users who might copy this.

I was thinking recently that it would be better to just kill the dlist
use in the libibverbs API entirely.  It was a mistake to be lazy and
use the code for sysfs, because I don't think dlist is designed very
well.  Returning something like a simple singly-linked list of devices
would be better.

What do you think?

 - R.



More information about the general mailing list