Re: [PATCH v2] ufs: core: fix ufshcd_abort_all racing issue

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

 



On Thu, 2024-06-27 at 17:19 +0800, Wenchao Hao wrote:
> 
> 
> Hi Bart,
> 
> A small wonder, then should we append __blk_mq_free_request() if
> req->ref decreased to 0 like following?
> 
>         if (req_ref_put_and_test(rq))
>                 __blk_mq_free_request(rq);
>  
> 
> > Thanks,
> > 
> > Bart.
> > 
> 

Hi Bart and Wenchao Hao,

It could be have side effect if we surrounding the blk_mq_unique_tag()
call with
atomic_inc_not_zero(&req->ref) / atomic_dec(&req->ref)?
Beacuse __blk_mq_free_request stll have other finish job to.

This is a chicken-and-egg problem. We need to acquire a lock to know
which hwq it is, 
but we need to know which hwq it is to acquire the lock. 
Therefore, to resolve this dilemma, perhaps we should just take all the
hwq locks 
indiscriminately?


Thanks.
Peter




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux