Re: [PATCH for-next v10 04/11] RDMA/rxe: Replace red-black trees by xarrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is a xa_lock_irqsave()/ublock_irqrestore but I actually need
some things that they don't support.
In particular there is not an option to call xa_alloc_cyclic_irqsave
and I also need an irqsave version
of kref_put_lock and had to code one which calls the refcount version
but again that takes the address
of a lock and not an xarray. All this is because rdmacm is crazy and
makes verbs api calls with
spinlocks held.

Bob

On Mon, Feb 28, 2022 at 10:57 AM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
>
> On Fri, Feb 25, 2022 at 01:57:44PM -0600, Bob Pearson wrote:
>
> > +void *rxe_pool_get_index(struct rxe_pool *pool, u32 index)
> > +{
> > +     struct rxe_pool_elem *elem;
> > +     unsigned long flags;
> > +     void *obj;
> > +
> > +     spin_lock_irqsave(&pool->xa.xa_lock, flags);
>
> You can't reach into the xa_lock like this, use the xa_lock()
> family of functions instead, everywhere.
>
> Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux