Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Hannes Reinecke <hare@suse.de>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Paolo Valente <paolo.valente@linaro.org>,
	Jens Axboe <axboe@kernel.dk>
Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH v2 07/18] block: introduce duration-limits priority class
Date: Fri, 13 Jan 2023 21:44:39 +0900	[thread overview]
Message-ID: <c1423109-dd39-11a3-58eb-5dc8c3e56520@opensource.wdc.com> (raw)
In-Reply-To: <08d6acff-9aaf-7c2f-6b4d-7fd83c7a68c6@suse.de>

On 1/13/23 20:55, Hannes Reinecke wrote:
> On 1/12/23 15:03, Niklas Cassel wrote:
>> From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
>>
>> Introduce the IOPRIO_CLASS_DL priority class to indicate that IOs should
>> be executed using duration-limits targets. The duration target to apply
>> to a command is indicated using the priority level. Up to 8 levels are
>> supported, with level 0 indiating "no limit".
>>
>> This priority class has effect only if the target device supports the
>> command duration limits feature and this feature is enabled by the user.
>> In BFQ and mq-deadline, all requests with this new priority class are
>> handled using the highest priority class RT and priority level 0.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
>> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
>> ---
>>   block/bfq-iosched.c         | 10 ++++++++++
>>   block/blk-ioprio.c          |  3 +++
>>   block/ioprio.c              |  3 ++-
>>   block/mq-deadline.c         |  1 +
>>   include/linux/ioprio.h      |  2 +-
>>   include/uapi/linux/ioprio.h |  7 +++++++
>>   6 files changed, 24 insertions(+), 2 deletions(-)
>>
> I wonder.
> 
> _Normally_ a command timeout is only in force once the command is being 
> handed off to the driver. As such it doesn't apply for any scheduling 
> being done before that; most notably the I/O scheduler is not affected 
> by any command timeout.
> 
> And I was under the impression that CDL really only allows the drive to 
> impose a command timeout on its own.
> (Pray correct me if I'm mistaken)

The CDL descriptors to be used for read/write commands are defined by the
user and set on the drive (write log command). By default, the drive does
not have any CDL descriptor set, so no limit == regular behavior (no
timeout aborts). Also keep in mind that CDLs may be of the (1) "best
effort" flavor, or the (2) "abort" flavor. For (2), a command missing its
CDL limit will be aborted by the device (limit set by the user !). But for
(1), the drive will continue executing the command even if the CDL limit
is exceeded, so no timeout error.

> Hence: does CDL really impinge on the I/O scheduler? Or shouldn't we 
> treat CDL just like a 'normal' command timeout, only to be activated 
> when normal command timeout is enabled?

No impact on the IO scheduler, at least for now. But given that CDL is all
about controlling IO latency, we would miss that goal if we have an IO
scheduler that excessively delays a request with a short CDL set...

The main point of this patch is to have CDL commands treated similarly to
high priority commands to avoid such delays. This is also consistant with
the fact that CDL and ATA NCQ priority commands are mutually exclusive
features. They cannot be used together. So there we cannot have a mix of
CDL and NCQ prio commands together to the same drive.

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-01-13 12:57 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 14:03 [PATCH v2 00/18] Add Command Duration Limits support Niklas Cassel
2023-01-12 14:03 ` [PATCH v2 01/18] ata: libata: allow ata_scsi_set_sense() to not set CHECK_CONDITION Niklas Cassel
2023-01-13  7:49   ` Hannes Reinecke
2023-01-17  6:06   ` Christoph Hellwig
2023-01-17  7:10     ` Damien Le Moal
2023-01-17  7:12       ` Christoph Hellwig
2023-01-17  7:15         ` Damien Le Moal
2023-01-17  7:23           ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 02/18] ata: libata: allow ata_eh_request_sense() " Niklas Cassel
2023-01-13  7:51   ` Hannes Reinecke
2023-01-17  6:08   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 03/18] scsi: core: allow libata to complete successful commands via EH Niklas Cassel
2023-01-13  7:57   ` Hannes Reinecke
2023-01-16 12:43     ` Niklas Cassel
2023-01-17 11:44       ` Hannes Reinecke
2023-01-17  7:24   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 04/18] scsi: rename and move get_scsi_ml_byte() Niklas Cassel
2023-01-13  7:58   ` Hannes Reinecke
2023-01-17  6:12   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 05/18] scsi: support retrieving sub-pages of mode pages Niklas Cassel
2023-01-13  7:59   ` Hannes Reinecke
2023-01-17  6:13   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 06/18] scsi: support service action in scsi_report_opcode() Niklas Cassel
2023-01-13 11:48   ` Hannes Reinecke
2023-01-17  6:13   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 07/18] block: introduce duration-limits priority class Niklas Cassel
2023-01-13 11:55   ` Hannes Reinecke
2023-01-13 12:44     ` Damien Le Moal [this message]
2023-01-17  7:25   ` Christoph Hellwig
2023-01-17  8:06     ` Damien Le Moal
2023-01-17  8:13       ` Christoph Hellwig
2023-01-17  8:14         ` Damien Le Moal
2023-01-12 14:03 ` [PATCH v2 08/18] block: introduce BLK_STS_DURATION_LIMIT Niklas Cassel
2023-01-13 11:56   ` Hannes Reinecke
2023-01-17  7:26   ` Christoph Hellwig
2023-01-12 14:03 ` [PATCH v2 09/18] ata: libata: detect support for command duration limits Niklas Cassel
2023-01-13 11:59   ` Hannes Reinecke
2023-01-12 14:03 ` [PATCH v2 10/18] ata: libata-scsi: handle CDL bits in ata_scsiop_maint_in() Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 11/18] ata: libata-scsi: add support for CDL pages mode sense Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 12/18] ata: libata: add ATA feature control sub-page translation Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 13/18] ata: libata: set read/write commands CDL index Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 14/18] scsi: sd: detect support for command duration limits Niklas Cassel
2023-01-17  7:37   ` Christoph Hellwig
2023-01-17  8:00     ` Damien Le Moal
2023-01-12 14:04 ` [PATCH v2 15/18] scsi: sd: set read/write commands CDL index Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 16/18] scsi: sd: handle read/write CDL timeout failures Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 17/18] ata: libata: handle completion of CDL commands using policy 0xD Niklas Cassel
2023-01-12 14:04 ` [PATCH v2 18/18] Documentation: sysfs-block-device: document command duration limits Niklas Cassel

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=c1423109-dd39-11a3-58eb-5dc8c3e56520@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=niklas.cassel@wdc.com \
    --cc=paolo.valente@linaro.org \
    /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