Re: [PATCH rdma-rc] RDMA/usnic: Lock VF with mutex instead of spinlock

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

 



On Mon, Sep 13, 2021 at 08:17:00AM +0000, Haakon Bugge wrote:
> 
> 
> > On 13 Sep 2021, at 10:04, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> > 
> > From: Leon Romanovsky <leonro@xxxxxxxxxx>
> > 
> > Usnic VF doesn't need lock in atomic context to create QPs, so it is safe
> > to use mutex instead of spinlock. Such change fixes the following smatch
> > error.
> 
> s/GFP_ATOMIC/GFP_KERNEL/ in find_free_vf_and_create_qp_grp() as well?

Do you mean in usnic_uiom_get_dev_list()?
That GFP_ATOMIC existed before my patch while we are holding usdev_lock mutex.

Anyway, I prefer to touch that driver as less as possible.

The allocations can continue to be with GFP_ATOMIC while we use mutex.
It is bad thing, but not a necessary to fix bug. We just wasting atomic
memory and instruct kernel do not sleep while
doing allocations.

Thanks



[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