On Sun, Sep 05, 2021 at 05:36:23PM +0300, Gal Pressman wrote: > > I can't say if it is needed or not, just wanted to understand why you need > > complexity in destroy_cq path. > > Well, as I said, I don't think the restrack protection is enough in this case as > it isn't aware of the concurrent eq flow. > > I guess I can put a synchronize_irq() on destroy_cq flow to get rid of the race. That is a better choice that synchronize_rcu(), IIRC synchronize_rcu should be avoided compared to all other forms of synchronization because it can take seconds per call to complete, and in a reasonable verbs app this means potentially minutes to close the verbs FD and destroy many CQs. Jason