Re: [PATCH v3 01/15] scsi_debug: randomize command completion time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/20 9:08 PM, Douglas Gilbert wrote:
> 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 unformily 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' .
> 
> Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
> ---
>  drivers/scsi/scsi_debug.c | 42 ++++++++++++++++++++++++++++++++++++---
>  1 file changed, 39 insertions(+), 3 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@xxxxxxx			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux