Re: [PATCH v3 01/18] block: introduce duration-limits priority class
From: Damien Le Moal <hidden>
Date: 2023-01-24 21:48:30
Also in:
linux-block, linux-scsi
On 1/25/23 05:36, Bart Van Assche wrote:
On 1/24/23 11:27, Bart Van Assche wrote:quoted
Implementing duration limit support using the I/O priority mechanism makes it impossible to configure the I/O priority for commands that have a duration limit. Shouldn't the duration limit be independent of the I/O priority? Am I perhaps missing something?(replying to my own e-mail) In SAM-6 I found the following: "The device server may use the duration expiration time to determine the order of processing commands with the SIMPLE task attribute within the task set. A difference in duration expiration time between commands may override other scheduling considerations (e.g., different times to access different logical block addresses or vendor specific scheduling considerations). Processing of a collection of commands with different command duration limit settings should cause a command with an earlier duration expiration time to complete with status sooner than a command with a later duration expiration time." Do I understand correctly that it is optional for a SCSI device to interpret the command duration as a priority and that this is not mandatory?
This describes the expected behavior from the drive in terms of command execution ordering when CDL is used. The text is a little "soft" and sound as if this behavior is optional because CDL is a combination of time limits AND a policy for each time limit. The policy of a CDL indicates what the drive behavior should be if a command misses its time limit. In short, there are 2 policies: 1) best-effort: the time limit is a hint of sorts. If the drive fails to execute the command before the limit expires, the command is not aborted and execution continues. 2) fast-fail: If the drive fails to execute the command before the time limit expires, the command must be completed with an error immediately. And CDL also has a field, settable by the user, that describes an allowed performance degradation to achieve CDL scheduling in time. That is, most important for the best-effort case to indicate how "serious" the user is about the CDL limit "hint". So as you can see I think, the SAM-6 text is vague because of the many possible variations in scheduling policies that need to be implemented by a drive. -- Damien Le Moal Western Digital Research