[ofa-general] Re: mlx4 violating radix tree API locking rules?
Michael S. Tsirkin
mst at dev.mellanox.co.il
Sun Sep 16 23:22:52 PDT 2007
> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: mlx4 violating radix tree API locking rules?
>
> > 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.
Why not just call synchronize_rcu instead?
--
MST
More information about the general
mailing list