mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
ata: Enabling ATA Command Priorities
This patch checks to see if an ATA device supports NCQ command priorities. If so and the user has specified an iocontext that indicates IO_PRIO_CLASS_RT then we build a tf with a high priority command. This is done to improve the tail latency of commands that are high priority by passing priority to the device. tj: Removed trivial ata_ncq_prio_enabled() and open-coded the test. Signed-off-by: Adam Manzanares <adam.manzanares@hgst.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
5dc8b362a2
commit
8e061784b5
5 changed files with 49 additions and 3 deletions
|
@ -348,6 +348,7 @@ enum {
|
|||
ATA_LOG_DEVSLP_DETO = 0x01,
|
||||
ATA_LOG_DEVSLP_VALID = 0x07,
|
||||
ATA_LOG_DEVSLP_VALID_MASK = 0x80,
|
||||
ATA_LOG_NCQ_PRIO_OFFSET = 0x09,
|
||||
|
||||
/* NCQ send and receive log */
|
||||
ATA_LOG_NCQ_SEND_RECV_SUBCMDS_OFFSET = 0x00,
|
||||
|
@ -940,6 +941,11 @@ static inline bool ata_id_has_ncq_non_data(const u16 *id)
|
|||
return id[ATA_ID_SATA_CAPABILITY_2] & BIT(5);
|
||||
}
|
||||
|
||||
static inline bool ata_id_has_ncq_prio(const u16 *id)
|
||||
{
|
||||
return id[ATA_ID_SATA_CAPABILITY] & BIT(12);
|
||||
}
|
||||
|
||||
static inline bool ata_id_has_trim(const u16 *id)
|
||||
{
|
||||
if (ata_id_major_version(id) >= 7 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue