From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH v3 rcu 7/8] rcutorture: Avoid torture.sh compressing identical files
Date: Wed, 19 Oct 2022 16:02:05 -0700 [thread overview]
Message-ID: <20221019230206.2501794-7-paulmck@kernel.org> (raw)
In-Reply-To: <20221019230203.GA2501612@paulmck-ThinkPad-P17-Gen-1>
Currently, torture.sh will compress the vmlinux files for KASAN and
KCSAN runs. But it will compress all of the files, including those
copied verbatim by the kvm-again.sh script. Compression takes around ten
minutes, so this is not a good thing. This commit therefore compresses
only one of a given set of identical vmlinux files, and then hard-links
it to the directories produced by kvm-again.sh.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
.../selftests/rcutorture/bin/torture.sh | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index b376688fe280a..fc63539377147 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -536,7 +536,10 @@ if test -n "$tdir" && test $compress_concurrency -gt 0
then
# KASAN vmlinux files can approach 1GB in size, so compress them.
echo Looking for K[AC]SAN files to compress: `date` > "$tdir/log-xz" 2>&1
- find "$tdir" -type d -name '*-k[ac]san' -print > $T/xz-todo
+ find "$tdir" -type d -name '*-k[ac]san' -print > $T/xz-todo-all
+ find "$tdir" -type f -name 're-run' -print | sed -e 's,/re-run,,' |
+ grep -e '-k[ac]san$' > $T/xz-todo-copy
+ sort $T/xz-todo-all $T/xz-todo-copy | uniq -u > $T/xz-todo
ncompresses=0
batchno=1
if test -s $T/xz-todo
@@ -568,6 +571,22 @@ then
echo Waiting for final batch $batchno of $ncompresses compressions `date` | tee -a "$tdir/log-xz" | tee -a $T/log
fi
wait
+ if test -s $T/xz-todo-copy
+ then
+ echo Linking vmlinux.xz files to re-use scenarios `date` | tee -a "$tdir/log-xz" | tee -a $T/log
+ dirstash="`pwd`"
+ for i in `cat $T/xz-todo-copy`
+ do
+ cd $i
+ find "$i" -name vmlinux -print > $T/xz-todo-copy-vmlinux
+ for v in `cat $T/xz-todo-copy-vmlinux`
+ do
+ rm -f "$v"
+ cp -l "$i/$v".xz "`dirname "$v"`"
+ done
+ cd "$dirstash"
+ done
+ fi
echo Size after compressing $n2compress files: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
echo Total duration `get_starttime_duration $starttime`. | tee -a $T/log
else
--
2.31.1.189.g2e36527f23
next prev parent reply other threads:[~2022-10-19 23:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 23:02 [PATCH rcu 0/8] Torture-test scripting updates for v6.2 Paul E. McKenney
2022-10-19 23:01 ` [PATCH v3 rcu 1/8] rcutorture: Add --bootargs parameter to kvm-again.sh Paul E. McKenney
2022-10-19 23:02 ` [PATCH v3 rcu 2/8] torture: Use mktemp instead of guessing at unique names Paul E. McKenney
2022-10-19 23:02 ` [PATCH v3 rcu 3/8] rcutorture: Make kvm-test-1-run-qemu.sh check for alternative output Paul E. McKenney
2022-10-19 23:02 ` [PATCH v3 rcu 4/8] rcutorture: Make kvm-recheck.sh export TORTURE_SUITE Paul E. McKenney
2022-10-19 23:02 ` [PATCH v3 rcu 5/8] rcutorture: Add --datestamp parameter to kvm-again.sh Paul E. McKenney
2022-10-19 23:02 ` [PATCH v3 rcu 6/8] rcutorture: Avoid redundant builds for rcuscale and refscale in torture.sh Paul E. McKenney
2022-10-19 23:02 ` Paul E. McKenney [this message]
2022-10-19 23:02 ` [PATCH v3 rcu 8/8] torture: Make torture.sh create a properly formatted log file Paul E. McKenney
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=20221019230206.2501794-7-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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