]> www.infradead.org Git - users/willy/xarray.git/commit
scsi: smartpqi: add counter for parity write stream requests
authorMahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Tue, 27 Aug 2024 18:54:57 +0000 (13:54 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Aug 2024 02:10:34 +0000 (22:10 -0400)
commit283dcc1b142ebd60786f8f5e3fbbd53a51035739
treeaa8d0cd6869afcf9efe08dfa5671bd116e97c085
parent4c76114932d1d6fad2e72823e7898a3c960cf2a7
scsi: smartpqi: add counter for parity write stream requests

Add sysfs entry to check for write stream requests.

Move existing raid_bypass_cnt into a structure named pqi_raid_io_stats and
add member write_stream_cnt. These two counters are related because write
stream detection is only checked if an I/O request is eligible for bypass
(AIO).

Example usage:

lsscsi
[15:1:0:0]   disk    Adaptec  LOGICAL VOLUME   0129  /dev/sdae

cat /sys/block/sdae/device/ssd_smart_path_enabled
1
^
|
+---- NOTE: here bypass has been enabled on device sdae

To read the counter for parity write stream requests:

cat /sys/block/sdae/device/write_stream_cnt
0x60cd507

Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Co-developed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Link: https://lore.kernel.org/r/20240827185501.692804-4-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi.h
drivers/scsi/smartpqi/smartpqi_init.c