summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/smartpqi/smartpqi.h
diff options
context:
space:
mode:
authorDon Brace <don.brace@microchip.com>2021-03-11 14:15:56 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2021-04-05 23:02:30 -0400
commitc7ffedb3a774a835450a518566639254534e72c4 (patch)
tree0da64b6f5d7347725eca9058787159ae01fb286c /drivers/scsi/smartpqi/smartpqi.h
parent583891c9e509256a2b2902607c2e7a7c36beb0d3 (diff)
downloadlinux-c7ffedb3a774a835450a518566639254534e72c4.tar.bz2
scsi: smartpqi: Add stream detection
Enhance performance by adding sequential stream detection for RAID5/RAID6 sequential write requests. Reduce stripe lock contention with full-stripe write operations. There is one common stripe lock for each RAID volume that can be set by either the RAID engine or the AIO engine. The AIO path has I/O request sizes well below the stripe size resulting in many Read-Modify-Write operations. Sending the request to the RAID engine allows for coalescing requests into full stripe operations resulting in reduced Read-Modify-Write operations. Link: https://lore.kernel.org/r/161549375693.25025.2962141451773219796.stgit@brunhilda Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi/smartpqi.h')
-rw-r--r--drivers/scsi/smartpqi/smartpqi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h
index 6639432f3dab..976bfd8c5192 100644
--- a/drivers/scsi/smartpqi/smartpqi.h
+++ b/drivers/scsi/smartpqi/smartpqi.h
@@ -1043,6 +1043,13 @@ struct pqi_scsi_dev_raid_map_data {
#define RAID_CTLR_LUNID "\0\0\0\0\0\0\0\0"
+#define NUM_STREAMS_PER_LUN 8
+
+struct pqi_stream_data {
+ u64 next_lba;
+ u32 last_accessed;
+};
+
struct pqi_scsi_dev {
int devtype; /* as reported by INQUIRY commmand */
u8 device_type; /* as reported by */
@@ -1097,6 +1104,7 @@ struct pqi_scsi_dev {
struct list_head add_list_entry;
struct list_head delete_list_entry;
+ struct pqi_stream_data stream_data[NUM_STREAMS_PER_LUN];
atomic_t scsi_cmds_outstanding;
atomic_t raid_bypass_cnt;
};
@@ -1296,6 +1304,7 @@ struct pqi_ctrl_info {
u8 enable_r5_writes : 1;
u8 enable_r6_writes : 1;
u8 lv_drive_type_mix_valid : 1;
+ u8 enable_stream_detection : 1;
u8 ciss_report_log_flags;
u32 max_transfer_encrypted_sas_sata;