From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: John Garry <john.garry@huawei.com>,
jejb@linux.ibm.com, martin.petersen@oracle.com, hare@suse.de,
bvanassche@acm.org, hch@lst.de, ming.lei@redhat.com,
niklas.cassel@wdc.com
Cc: axboe@kernel.dk, jinpu.wang@cloud.ionos.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
linuxarm@huawei.com, john.garry2@mail.dcu.ie
Subject: Re: [PATCH RFC v3 2/7] ata: libata-scsi: Add ata_internal_queuecommand()
Date: Fri, 28 Oct 2022 17:07:26 +0900 [thread overview]
Message-ID: <71b56949-e4d7-fd94-c44a-867080b7a4fa@opensource.wdc.com> (raw)
In-Reply-To: <0e60fab5-8a76-9b7e-08cf-fb791e01ae08@huawei.com>
On 10/28/22 17:01, John Garry wrote:
> On 27/10/2022 23:25, Damien Le Moal wrote:
>>> So we have this overall flow:
>>>
>>> ata_exec_internal_sg():
>>> -> alloc request
>>> -> blk_execute_rq_nowait()
>>> ... -> scsi_queue_rq()
>>> -> sht->reserved_queuecommd()
>>> -> ata_internal_queuecommand()
>>>
>>> And then we have ata_internal_queuecommand() -> ata_sas_queuecmd() ->
>>> ata_scsi_queue_internal() -> ata_qc_issue().
>>>
>>> Hope it makes sense.
>> OK. Got it.
>> However, ata_exec_internal_sg() being used only from EH context with the
>> queue quiesced, will blk_execute_rq_nowait() work ? Is there an exception
>> for internal reserved tags ?
>>
>
> Well, yeah. So if some error happens and EH kicks in, then full queue
> depth of requests may be allocated. I have seen this for NCQ error. So
> this is why I make in very first patch change allow us to allocate
> reserved request from sdev request queue even when budget is fully
> allocated.
>
> Please also note that for AHCI, I make reserved depth =1, while for SAS
> controllers it is greater. This means that in theory we could alloc > 1x
> reserved command for SATA disk, but I don't think it matters.
Yes, 1 is enough. However, is 1 reserved out of 32 total, meaning that the
user can only use 31 tags ? or is it 32+1 reserved ? which we can do since
when using the reserved request, we will not use a hw tag (all reserved
requests will be non-ncq).
The 32 + 1 scheme will work. But for CDL command completion handling, we
will need a NCQ command to do a read log, to avoid forcing a queue drain.
For that to reliably work, we'll need a 31+1+1 setup...
>
> Thanks,
> John
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-10-28 8:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 10:32 [PATCH RFC v3 0/7] blk-mq/libata/scsi: SCSI driver tagging improvements Part II John Garry
2022-10-25 10:32 ` [PATCH RFC v3 1/7] ata: libata-scsi: Add ata_scsi_queue_internal() John Garry
2022-10-27 1:42 ` Damien Le Moal
2022-10-27 10:45 ` John Garry
2022-10-27 22:24 ` Damien Le Moal
2022-10-25 10:32 ` [PATCH RFC v3 2/7] ata: libata-scsi: Add ata_internal_queuecommand() John Garry
2022-10-27 1:45 ` Damien Le Moal
2022-10-27 9:56 ` John Garry
2022-10-27 13:02 ` Hannes Reinecke
2022-10-27 17:23 ` John Garry
2022-10-27 22:35 ` Damien Le Moal
2022-10-28 8:14 ` John Garry
2022-10-28 8:26 ` Damien Le Moal
2022-10-27 22:25 ` Damien Le Moal
2022-10-28 8:01 ` John Garry
2022-10-28 8:07 ` Damien Le Moal [this message]
2022-10-28 8:33 ` John Garry
2022-10-31 5:59 ` Damien Le Moal
2022-11-02 9:52 ` John Garry
2022-11-02 10:07 ` Damien Le Moal
2022-11-02 11:12 ` Hannes Reinecke
2022-11-02 11:25 ` Damien Le Moal
2022-11-07 10:12 ` Hannes Reinecke
2022-11-07 13:29 ` Damien Le Moal
2022-11-07 14:34 ` Hannes Reinecke
2022-10-25 10:32 ` [PATCH RFC v3 3/7] ata: libata: Make space for ATA queue command in scmd payload John Garry
2022-10-25 10:32 ` [PATCH RFC v3 4/7] ata: libata: Add ata_internal_timeout() John Garry
2022-10-25 10:32 ` [PATCH RFC v3 5/7] ata: libata: Queue ATA internal commands as requests John Garry
2022-10-25 10:32 ` [PATCH RFC v3 6/7] scsi: mvsas: Remove internal tag handling John Garry
2022-10-25 10:32 ` [PATCH RFC v3 7/7] scsi: hisi_sas: Remove internal tag handling for reserved commands John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71b56949-e4d7-fd94-c44a-867080b7a4fa@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=john.garry2@mail.dcu.ie \
--cc=john.garry@huawei.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=niklas.cassel@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox