Skip to content

scsi: improve fairness of starved list

Shaohua Li linux-scsi lkml 1 version In review

Get series with b4
b4 am 1324523408.22361.470.camel@sli10-conroe

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2scsi: scsi_run_queue() doesn't use local list to handle starved sdevdrivers/scsi/scsi_lib.c+14 -77 replies
2/2scsi: changed sdev order in starved list only when it dispatches requestsdrivers/scsi/scsi_lib.c+16 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/2]scsi: improve fairness of starved list

We recently found some performance regressions related to writeback. See http://marc.info/?l=linux-kernel&m=132391033818515&w=2. The test system uses a LSI 1068e card and 12 hard disks attached to it. The workload is a simple FIO test, which runs one thread for each disk to create files. The filesystem is EXT4. Compared to 3.1 kernel, we found both data=order and data=writeback mode have performance regression. data=writeback regression is bigger.
The scsi_host->can_queue = 127, where disk queue_depth=64, 64*12 > 127, so the fairness to utilize host can_queue is important for the overall throughput, otherwise some disks will be starved and others run in full speed. In this workload, we found recent I/O less writeback causes the fairness issue and the throughput get dropped.
We'd better fix the fairness issue in writeback, but on the other hand, the scsi layer also has fairness issue regarding to the starve list, which exists in old kernel too, but not that severe. Below two patches try to address the scsi issue, the test result is (average of 3 runs, data=writeback mode):

3.1: 1000045 KB/s
base: 854016 KB/s
base+patch: 958122 KB/s

The patches don't fully recover the regression, but give a 12% improvement.

Thanks,
Shaohua