Re: [PATCH] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING

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

 



On 8/21/20 4:16 AM, Ming Lei wrote:
> On Fri, Aug 21, 2020 at 08:34:48AM +0200, Christoph Hellwig wrote:
>>> -static void hctx_unlock(struct blk_mq_hw_ctx *hctx, int srcu_idx)
>>> -	__releases(hctx->srcu)
>>> +static void hctx_unlock(struct blk_mq_hw_ctx *hctx)
>>>  {
>>>  	if (!(hctx->flags & BLK_MQ_F_BLOCKING))
>>>  		rcu_read_unlock();
>>>  	else
>>> -		srcu_read_unlock(hctx->srcu, srcu_idx);
>>> +		percpu_ref_put(&hctx->queue->dispatch_counter);
>>
>> While you're at it:  can we avoid the pointless inversion in the if
>> statement and just do:
>>
>>  	if (hctx->flags & BLK_MQ_F_BLOCKING)
>> 		percpu_ref_put(&hctx->queue->dispatch_counter);
>> 	else
>> 		rcu_read_unlock();
> 
> OK, will do that, but strictly speaking they don't belong to this patch.

Yeah let's please not mix up the two.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux