[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <18625db0-5b3c-000f-2d01-14350701d52c@suse.de>
Date: Tue, 4 Apr 2023 20:45:29 +0200
From: Hannes Reinecke <hare@...e.de>
To: Niklas Cassel <nks@...wful.org>, Jens Axboe <axboe@...nel.dk>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org
Cc: Bart Van Assche <bvanassche@....org>,
Christoph Hellwig <hch@....de>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
linux-scsi@...r.kernel.org, linux-ide@...r.kernel.org,
linux-block@...r.kernel.org, Niklas Cassel <niklas.cassel@....com>
Subject: Re: [PATCH v5 02/19] block: introduce ioprio hints
On 4/4/23 20:24, Niklas Cassel wrote:
> From: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
>
> IO priorities currently only use 6-bits of the 16-bits ioprio value: the
> 3-upper bits are used to define up to 8 priority classes (4 of which are
> valid) and the 3 lower bits of the value are used to define a priority
> level for the real-time and best-effort class.
>
> The remaining 10-bits between the IO priority class and level are
> unused, and in fact, cannot be used by the user as doing so would
> either result in the value being completely ignored, or in an error
> returned by ioprio_check_cap().
>
> Use these 10-bits of an ioprio value to allow a user to specify IO
> hints. An IO hint is defined as a 10-bits value, allowing up to 1023
> different hints to be specified, with the value 0 being reserved as the
> "no hint" case. An IO hint can apply to any IO that specifies a valid
> priority class other than NONE, regardless of the IO priority level
> specified.
>
> To do so, the macros IOPRIO_PRIO_HINT() and IOPRIO_PRIO_VALUE_HINT() are
> introduced in include/uapi/linux/ioprio.h to respectively allow a user
> to get and set a hint in an ioprio value.
>
> To support the ATA and SCSI command duration limits feature, 7 hints
> are defined: IOPRIO_HINT_DEV_DURATION_LIMIT_1 to
> IOPRIO_HINT_DEV_DURATION_LIMIT_7, allowing a user to specify which
> command duration limit descriptor should be applied to the commands
> serving an IO. Specifying these hints has for now no effect whatsoever
> if the target block devices do not support the command duration limits
> feature. However, in the future, block IO schedulers can be modified to
> optimize IO issuing order based on these hints, even for devices that
> do not support the command duration limits feature.
>
> Given that the 7 duration limits hints defined have no effect on any
> block layer component, the actual definition of the duration limits
> implied by these hints remains at the device level.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
> Signed-off-by: Niklas Cassel <niklas.cassel@....com>
> ---
> include/uapi/linux/ioprio.h | 49 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
Powered by blists - more mailing lists