Message ID | 173706974167.1927324.3074850676975765263.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/23] generic/476: fix fsstress process management | expand |
On Thu, Jan 16, 2025 at 03:26:44PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > If we're not running fsstress as the scrub exerciser, don't set > _FSSTRESS_PID because the _kill_fsstress call in the cleanup function > will think that it has to wait for a nonexistant fsstress process. > This fixes the problem of xfs/565 runtime increasing from 30s to 800s > because it tries to kill a nonexistent "565.fsstress" process and then > waits for the fsx loop control process, which hasn't been sent any > signals. > > Cc: <fstests@vger.kernel.org> # v2024.12.08 > Fixes: 8973af00ec212f ("fstests: cleanup fsstress process management") > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> > --- > common/fuzzy | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > > diff --git a/common/fuzzy b/common/fuzzy > index 534e91dedbbb43..0a2d91542b561e 100644 > --- a/common/fuzzy > +++ b/common/fuzzy > @@ -1392,7 +1392,11 @@ _scratch_xfs_stress_scrub() { > > "__stress_scrub_${exerciser}_loop" "$end" "$runningfile" \ > "$remount_period" "$stress_tgt" & > - _FSSTRESS_PID=$! > + # The loop is a background process, so _FSSTRESS_PID is set in that > + # child. Unfortunately, this process doesn't know about it. Therefore > + # we need to set _FSSTRESS_PID ourselves so that cleanup tries to kill > + # fsstress. > + test "${exerciser}" = "fsstress" && _FSSTRESS_PID=$! Yup, looks fine. Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff --git a/common/fuzzy b/common/fuzzy index 534e91dedbbb43..0a2d91542b561e 100644 --- a/common/fuzzy +++ b/common/fuzzy @@ -1392,7 +1392,11 @@ _scratch_xfs_stress_scrub() { "__stress_scrub_${exerciser}_loop" "$end" "$runningfile" \ "$remount_period" "$stress_tgt" & - _FSSTRESS_PID=$! + # The loop is a background process, so _FSSTRESS_PID is set in that + # child. Unfortunately, this process doesn't know about it. Therefore + # we need to set _FSSTRESS_PID ourselves so that cleanup tries to kill + # fsstress. + test "${exerciser}" = "fsstress" && _FSSTRESS_PID=$! if [ -n "$freeze" ]; then __stress_scrub_freeze_loop "$end" "$runningfile" &