Re: [PATCH 03/21] scsi: add scsi_{get,put}_internal_cmd() helper

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

 



On 16/11/2020 09:03, Hannes Reinecke wrote:
Hi Hannes,

Is there any way to ensure that the request allocated is associated with some determined HW queue here?

The reason for this requirement is that sometimes the LLDD must submit some internal IO (for which we allocate an "internal command") on a specific HW queue. An example of this is internal abort IO commands, which should be submitted on the same queue as the IO which we are attempting to abort was submitted.

So, for sure, the LLDD does not have to honor the hwq associated with the request and submit on the desired queue, but then we lose the blk-mq CPU hotplug protection. And maybe other problems.

One way to achieve this is to run scsi_get_internal_cmd() on a CPU associated with the desired HW queue, but that's a bit hacky. Not sure of another way.

Hmm. You are correct for the 'abort' command; that typically needs to be submitted to a specific hwq.


So now I see that we have blk_mq_alloc_request_hctx(..., hctx_idx) already, so that should do the job :)

Thanks,
John



[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