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 v4 00/14] scsi_debug: host managed ZBC + doublestore
Date: Tue, 25 Feb 2020 01:23:37 -0500 [thread overview]
Message-ID: <20200225062351.21267-1-dgilbert@interlog.com> (raw)
The major addition is support for host-managed ZBC devices.
The bulk of the work in this area was done by Damien Le Moal.
It allows ZBC devices with a mix of conventional and
"sequential write required" zones to be specified. These
follow the same model as direct access devices in this
driver. Namely, each device has its own metadata (including
its write pointer(s)) but all (scsi_debug) devices share the
same user data store (see doublestore below).
Significantly, this simulation passes the test/zbc_tests.sh
script in the https://github.com/hgst/libzbc repository.
The lower numbered patches in this set contain various
measures to improve the speed and usefulness of this driver.
It is being used to test the rewrite of the SCSI generic (sg)
driver which is still underway. Disk to disk copies are the
test of choice by the author [DG]. Comparing the results
between (simulated) disks is useless since all scsi_debug
devices share the same user data store. This limitation was
circumvented by adding the doublestore parameter. When set,
doublestore doubles the data store and allocates them in an
alternating pattern to each scsi_debug device. To enhance
the comparisons, simulations of VERIFY(10 and 16) commands
have been added. A further enhancement is to simulate the
PRE-FETCH command (which does nothing as the data is
already cached).
doublestore can also help with ZBC testing. Single threaded
copy commands like dd (and ddpt) can be used to copy one
non-empty zone into another empty zone. Multiple-threaded
copies (e.g. sgp_dd) can do out-of-order WRITEs which
become a WRITE VIOLATION error in a "sequential write
required" zone.
The author [DG] found that precise command duration timing
gave a false impression of how "bulletproof" the sg driver
state machines and locking were. The first patch involves
randomizing the command durations and it did expose various
issues in the driver under test (sg).
Since all scsi_debug memory store accesses are done in the
context of queuecommand() call, the *_irqsave() and
*_irqrestore() variants of the associated locks have been
removed. That could be a problem if queuecommand() can ever
be called form an interrupt or related context.
Finally to address the discrepancy between command duration
times seen by the sg driver compared to what was set with
this driver's ndelay option, this driver's timekeeping for
short durations was made more accurate.
If and when this patchset is accepted, this page will be
updated: http://sg.danny.cz/sg/sdebug26.html
This patchset is against Martin Petersen's git repository
and its 5.7/scsi-queue branch.
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).
Damien Le Moal (3):
scsi_debug: zone_max_open module parameter
scsi_debug: zone_nr_conv module parameter
scsi_debug: zone_size_mb module parameter
Douglas Gilbert (11):
scsi_debug: randomize command completion time
scsi_debug: add doublestore 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: expand zbc support
scsi_debug: add zone commands
scsi_debug: add zbc parameter
scsi_debug: re-arrange parameters alphabetically
scsi_debug: bump to version 1.89
drivers/scsi/scsi_debug.c | 1555 ++++++++++++++++++++++++++++++++-----
1 file changed, 1359 insertions(+), 196 deletions(-)
--
2.25.1
next reply other threads:[~2020-02-25 6:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 6:23 Douglas Gilbert [this message]
2020-02-25 6:23 ` [PATCH v4 01/14] scsi_debug: randomize command completion time Douglas Gilbert
2020-04-13 22:24 ` Martin K. Petersen
2020-02-25 6:23 ` [PATCH v4 02/14] scsi_debug: add doublestore option Douglas Gilbert
2020-04-13 22:36 ` Martin K. Petersen
2020-02-25 6:23 ` [PATCH v4 03/14] scsi_debug: implement verify(10), add verify(16) Douglas Gilbert
2020-04-13 22:48 ` Martin K. Petersen
2020-02-25 6:23 ` [PATCH v4 04/14] scsi_debug: weaken rwlock around ramdisk access Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 05/14] scsi_debug: improve command duration calculation Douglas Gilbert
2020-04-13 22:50 ` Martin K. Petersen
2020-02-25 6:23 ` [PATCH v4 06/14] scsi_debug: implement pre-fetch commands Douglas Gilbert
2020-04-13 22:57 ` Martin K. Petersen
2020-04-19 18:01 ` Douglas Gilbert
2020-04-19 18:22 ` Julian Wiedmann
2020-04-19 21:53 ` Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 07/14] scsi_debug: expand zbc support Douglas Gilbert
2020-04-13 23:00 ` Martin K. Petersen
2020-04-13 23:05 ` Damien Le Moal
2020-04-13 23:06 ` Damien Le Moal
2020-04-14 1:55 ` Martin K. Petersen
2020-04-14 5:38 ` Damien Le Moal
2020-02-25 6:23 ` [PATCH v4 08/14] scsi_debug: add zone commands Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 09/14] scsi_debug: add zbc parameter Douglas Gilbert
2020-04-15 2:10 ` Martin K. Petersen
2020-02-25 6:23 ` [PATCH v4 10/14] scsi_debug: re-arrange parameters alphabetically Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 11/14] scsi_debug: zone_max_open module parameter Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 12/14] scsi_debug: zone_nr_conv " Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 13/14] scsi_debug: zone_size_mb " Douglas Gilbert
2020-02-25 6:23 ` [PATCH v4 14/14] scsi_debug: bump to version 1.89 Douglas Gilbert
2020-04-13 23:19 ` [PATCH v4 00/14] scsi_debug: host managed ZBC + doublestore Martin K. Petersen
2020-04-14 2:49 ` Douglas Gilbert
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=20200225062351.21267-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).