Skip to content

per_host_store+random parameters, compare

Douglas Gilbert linux-scsi 5 versions – Applied

Status from this message: Applied to 5.8/scsi-queue, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest8 patches 1 replyApplied
  2. v414 patches 16 repliesSuperseded
  3. v315 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC6 patches0 repliesSuperseded
v1 RFC6 patches1 replySuperseded

Changes in v5 from the cover letter

- the ZBC related patches have been removed and will be presented as a separate patchset
- the doublestore parameter has been generalized and renamed to per_host_store=0|1 (bool). An xarray is used to track each store
- the PRE-FETCH patch implementation now does something: it calls prefetch_range() on the indicated segment of the ramdisk

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/8scsi_debug: randomize command completion timedrivers/scsi/scsi_debug.c+39 -30 replies
2/8scsi_debug: add per_host_store optiondrivers/scsi/scsi_debug.c+496 -2140 replies
3/8scsi_debug: implement verify(10), add verify(16)drivers/scsi/scsi_debug.c+94 -70 replies
4/8scsi_debug: weaken rwlock around ramdisk accessdrivers/scsi/scsi_debug.c+18 -290 replies
5/8scsi_debug: improve command duration calculationdrivers/scsi/scsi_debug.c+29 -20 replies
6/8scsi_debug: implement pre-fetch commandsdrivers/scsi/scsi_debug.c+70 -50 replies
7/8scsi_debug: re-arrange parameters alphabeticallydrivers/scsi/scsi_debug.c+18 -160 replies
8/8scsi_debug: bump to version 1.89drivers/scsi/scsi_debug.c+3 -30 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchHannes Reinecke
1/8R-b
2/8
3/8R-b
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/8] per_host_store+random parameters, compare

This patchset contains one large and several small improvements to the scsi_debug driver. The large one is the new per_host_store parameter. After it is set to 1, a following write to the add_host parameter will cause each newly created host to get its own store (e.g. its own ramdisk for user data). A host may contain 1 or more targets and each target may contain 1 or more Logical Units (LUs). So every LU within a host (by default there is only 1) will share the same store.

Since the scsi_debug driver is used mainly as a test vehicle, the author found the addition of the random parameter very useful. Rather than have fixed durations (set by the delay or ndelay parameters), each issued command chooses from a uniformly distributed range between 0 and the current delay parameter. Significantly this leads to out-of-order completions which adds an extra dimension to testing. For example it found a flaw in the implementation of the COMPARE AND WRITE command.

With the ability to have multiple stores, the accuracy of copies can be checked by comparing the source and destination after the copy. Rather than read both sides into the user space buffers and comparing them, one side can be read and that data sent with a VERIFY(BYTCHK=1) command to the other side. The previously dummy VERIFY command is enhanced in a patch to allow this alternate compare technique. And speed can be (slightly) enhanced with the newly added PRE-FETCH command as part of the compare sequence.

Updated documentation for this driver can be found at:
http://sg.danny.cz/sg/scsi_debug.html

This patchset was previously presented as the first half of a patchset titled:
[PATCH v4 00/14] scsi_debug: host managed ZBC + doublestore
sent to the linux-scsi list on 20200225

Changes since v4:
- the ZBC related patches have been removed and will be presented as a separate patchset
- the doublestore parameter has been generalized and renamed to per_host_store=0|1 (bool). An xarray is used to track each store
- the PRE-FETCH patch implementation now does something: it calls prefetch_range() on the indicated segment of the ramdisk

Changes since v3:
- make enumeration constants of sdebug_z_cond upper case
- move stray alphabetical re-order into correct patch
- add some reviewed-by lines
- meld 'zbc module parameter' and 'zbc parameter can be string' into single 'add zbc parameter' patch
- make zbc= parameter read-only

Changes since v2 (RFC):
- add support for host-managed zbc devices with
conventional and "sequential write required"
zones [DLM]

Changes since v1 (RFC):
- testing with version 1 caused several strange crashes that turned out to be caused by a code trick to read in the data-out buffer but _not_ place it in the big fake_storep array. This approach failed badly when multiple threads were doing verifies at the same time.
- replace the code trick with a new do_dout_fetch() function
- since the code trick was borrowed from the COMPARE AND WRITE implementation [resp_comp_write()] using do_dout_fetch() fixes the same bug in the existing driver which hasn't been reported (yet).

Douglas Gilbert (8):
scsi_debug: randomize command completion time
scsi_debug: add per_host_store option
scsi_debug: implement verify(10), add verify(16)
scsi_debug: weaken rwlock around ramdisk access
scsi_debug: improve command duration calculation
scsi_debug: implement pre-fetch commands
scsi_debug: re-arrange parameters alphabetically
scsi_debug: bump to version 1.89

 drivers/scsi/scsi_debug.c | 1000 +++++++++++++++++++++++++++----------
 1 file changed, 744 insertions(+), 256 deletions(-)
Signature · 1 line
2.26.1