Re: [PATCH 27/34] fuzzy: port fsx and fsstress loop to use --duration

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



On Tue, Feb 04, 2025 at 01:29:20PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Quite a while ago, I added --duration= arguments to fsx and fsstress,
> and apparently I forgot to update the scrub stress loops to use them.
> Replace the usage of timeout(1) for the remount_period versions of the
> loop to clean up that code; and convert the non-remount loop so that
> they don't run over time.

....

> @@ -1115,7 +1124,8 @@ __stress_scrub_fsstress_loop() {
>  			# anything.
>  			test "$mode" = "rw" && __stress_scrub_clean_scratch && continue
>  
> -			_run_fsstress_bg $args $rw_arg >> $seqres.full
> +			duration=$(___stress_scrub_duration "$end" "$remount_period")
> +			_run_fsstress_bg $duration $args $rw_arg >> $seqres.full
>  			sleep $remount_period
>  			_kill_fsstress

Why does this need to run fsstress in the background any more? If it
is only going to run for $remount_period, then run it in the
foreground and get rid of the sleep/kill that stopped it after
$remount_period. i.e. doesn't this:

-			_run_fsstress_bg $args $rw_arg >> $seqres.full
+			duration=$(___stress_scrub_duration "$end" "$remount_period")
+			_run_fsstress $duration $args $rw_arg >> $seqres.full
-			sleep $remount_period
-			_kill_fsstress

do the same thing, only cleaner?

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux