[ofa-general] Re: mlx4 violating radix tree API locking rules?

Roland Dreier rdreier at cisco.com
Tue Sep 11 14:19:49 PDT 2007


 > I guess CQ spinlock implies rcu_read_lock - is that right?
 > But I do not see any synchronize_rcu calls anywhere in mlx4.
 > Should destroy QP and friends call synchronize_rcu after
 > removing the QP from radix tree but before freeing the QP structure?

Well, I don't think we're really trying to use RCU to synchronize the
radix tree.  It's the same locking scheme as in mthca, except without
the home-grown sparse array stuff: we have a qp table lock that
protects inserting and removing QPs, and then we use the CQ locks to
avoid looking up a QP that is being removed.

However, I think you're right: we do violate the radix tree locking
rules.  So maybe we need to fall back to our own homegrown array stuff
as in mthca.



More information about the general mailing list