aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorDouglas Gilbert <[email protected]>2020-04-21 11:14:17 -0400
committerMartin K. Petersen <[email protected]>2020-05-04 23:05:21 -0400
commit0c4bc91d664953780990b0d1d8d1a65f9256474d (patch)
tree7f941fb5591f8b7ae4f4767afe7cc2120a2b1c1e /tools/perf/scripts/python/export-to-sqlite.py
parent6f41f08c88c59ae6e32d32563c9af73ae2d71ece (diff)
scsi: scsi_debug: Randomize command completion time
Add a new command line option (e.g. random=1) and sysfs attribute that causes subsequent command completion times to be between the current command delay setting and 0. A uniformly distributed 32 bit, kernel provided integer is used for this purpose. Since the existing 'delay' whose units are jiffies (typically milliseconds) and 'ndelay' (units: nanoseconds) options (and sysfs attributes) span a range greater than 32 bits, some scaling is required. The purpose of this patch is to widen the range of testing cases that are visited in long running tests. Put simply: rarely struct race conditions are more likely to be found when this facility is used. The default is the previous case in which all command completions were roughly equal to (if not, slightly longer) than the value given by the 'delay' or 'ndelay' settings (or their defaults). This option's default is equivalent to setting 'random=0' . [mkp: use kstrtobool()] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Douglas Gilbert <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions