From: Douglas Gilbert <dgilbert@interlog.com>
To: linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com,
hare@suse.de, Damien.LeMoal@wdc.com
Subject: [PATCH v5 0/8] per_host_store+random parameters, compare
Date: Tue, 21 Apr 2020 11:14:16 -0400 [thread overview]
Message-ID: <20200421151424.32668-1-dgilbert@interlog.com> (raw)
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(-)
--
2.26.1
next reply other threads:[~2020-04-21 15:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 15:14 Douglas Gilbert [this message]
2020-04-21 15:14 ` [PATCH v5 1/8] scsi_debug: randomize command completion time Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 2/8] scsi_debug: add per_host_store option Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 3/8] scsi_debug: implement verify(10), add verify(16) Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 4/8] scsi_debug: weaken rwlock around ramdisk access Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 5/8] scsi_debug: improve command duration calculation Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 6/8] scsi_debug: implement pre-fetch commands Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 7/8] scsi_debug: re-arrange parameters alphabetically Douglas Gilbert
2020-04-21 15:14 ` [PATCH v5 8/8] scsi_debug: bump to version 1.89 Douglas Gilbert
2020-05-05 4:41 ` [PATCH v5 0/8] per_host_store+random parameters, compare Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421151424.32668-1-dgilbert@interlog.com \
--to=dgilbert@interlog.com \
--cc=Damien.LeMoal@wdc.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.