Re: [PATCH rdma-next] RDMA/mlx5: Add a umr recovery flow

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

 



On Thu, May 26, 2022 at 07:29:20PM +0300, Leon Romanovsky wrote:

> > > +		err = mlx5r_umr_post_send(umrc->qp, mkey, &umr_context.cqe, wqe,
> > > +					  with_data);
> > > +		mutex_unlock(&umrc->lock);
> > > +		if (err) {
> > > +			mlx5_ib_warn(dev, "UMR post send failed, err %d\n",
> > > +				     err);
> > > +			break;
> > >  		}
> > > +
> > > +		wait_for_completion(&umr_context.done);
> > 
> > Nor is sleeping under a semaphore.
> 
> Not according to the kernel/locking/semaphore.c. Semaphores can sleep
> and the code protected by semaphores can sleep too.
> 
>    53 void down(struct semaphore *sem)
>    54 {
>    55         unsigned long flags;
>    56
>    57         might_sleep();
>    ....
>    64 }
>    65 EXPORT_SYMBOL(down);

Hum, OK, I am confused

> > And, I'm pretty sure, this entire function is called under a spinlock
> > in some cases.
>
> Can you point to such flow?

It seems like not anymore, or at least I couldn't find a case.

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