linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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
Subject: [RFC 0/6] scsi_debug: random doublestore verify
Date: Sat, 21 Dec 2019 22:59:42 -0500	[thread overview]
Message-ID: <20191222035948.30447-1-dgilbert@interlog.com> (raw)

This patchset contains various measures to improve the speed and
usefulness of this driver. It has been 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. Some
testing has been done using real hard disks and SSDs but the
bulk of the testing has been done using this driver as both the
source and destination of the copy. SSDs have two shortcomings:
they are not as fast as the manufacturers would like users to
believe with an average latency to READ at around 100
microseconds; the second problem is "endurance". Endurance is
a wear-out factor based on the number of WRITEs to the SSD.
One would hope both these measures will improve in the future.

The author found that precise command duration timing gave a
false impression of how "bulletproof" the sg driver state
machines and locking was. The first patch involving randomizing
the command durations and it did expose various issues in the
driver under test (sg). The next issue was the correctness of
the bulk copies being done. The doublestore and verify patches
allow the copies to be verified and it demonstrated at least
one area of concern for the sg driver.

Since all scsi_debug memory stores 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.

This patchset is against Martin Petersen's git repository
and its 5.6/scsi-queue branch.

---

One shortcoming of the doublestore approach is that both
stores share all the other module settings that are
held at file scope in the driver. With a little extra hacking
it is possible to have multiple scsi_debug (like) drivers
in a single kernel. That may be one way around this
shortcoming.

Douglas Gilbert (6):
  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: bump to version 1.89

 drivers/scsi/scsi_debug.c | 444 +++++++++++++++++++++++++++++---------
 1 file changed, 343 insertions(+), 101 deletions(-)

-- 
2.24.1


             reply	other threads:[~2019-12-22  4:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-22  3:59 Douglas Gilbert [this message]
2019-12-22  3:59 ` [RFC 1/6] scsi_debug: randomize command completion time Douglas Gilbert
2019-12-22  3:59 ` [RFC 2/6] scsi_debug: add doublestore option Douglas Gilbert
2019-12-22  3:59 ` [RFC 3/6] scsi_debug: implement verify(10), add verify(16) Douglas Gilbert
2019-12-30  6:04   ` Douglas Gilbert
2019-12-22  3:59 ` [RFC 4/6] scsi_debug: weaken rwlock around ramdisk access Douglas Gilbert
2019-12-22  3:59 ` [RFC 5/6] scsi_debug: improve command duration calculation Douglas Gilbert
2019-12-22  3:59 ` [RFC 6/6] scsi_debug: bump to version 1.89 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=20191222035948.30447-1-dgilbert@interlog.com \
    --to=dgilbert@interlog.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).