Re: [RFC PATCH V2 12/17] SCSI: create admin queue for each host

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

 




On 08/14/2018 01:56 PM, jianchao.wang wrote:
> Hi Ming
> 
> On 08/11/2018 03:12 PM, Ming Lei wrote:
>> +static blk_status_t scsi_admin_queue_rq(struct blk_mq_hw_ctx *hctx,
>> +			 const struct blk_mq_queue_data *bd)
>> +{
>> +	struct scsi_device *sdev = scsi_req(bd->rq)->sdev;
>> +
>> +	WARN_ON_ONCE(hctx->queue == sdev->request_queue);
>> +
>> +	if (!__scsi_mq_get_budget(hctx, sdev))
>> +		return BLK_STS_RESOURCE;
>> +
>> +	return __scsi_queue_rq(hctx, bd, sdev);
>> +}
> 
> Why does it return BLK_STS_RESOURCE here ?
> 
> Do you want to use the following code branch in blk_mq_dispatch_rq_list to get the admin queue rerun ?
> 
> 		else if (needs_restart && (ret == BLK_STS_RESOURCE))
> 			blk_mq_delay_run_hw_queue(hctx, BLK_MQ_RESOURCE_DELAY);
> 
> In theory, BLK_STS_DEV_RESOURCE should be returned here. However, I guess it will not work. Because
> the rr fashion loop restart has gone, the completion of normal queue will not restart the admin queue.
> If yes, please add some comment here to describe it. :)
> 

Looks like the patch 10 could avoid the admin queue hung.

Thanks
Jianchao



[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