From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: Martin Doucha <martin.doucha@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs
Date: Fri, 3 Jan 2025 08:06:34 +0100 [thread overview]
Message-ID: <20250103070634.GA186396@pevik> (raw)
In-Reply-To: <CAEemH2cXL8yu0jhHz7wefvBbDGy-wXcz8Mw1JZv8FqLAXHKm9Q@mail.gmail.com>
> On Thu, Jan 2, 2025 at 8:43 PM Petr Vorel <pvorel@suse.cz> wrote:
> > Hi Li, all,
> > [ Cc others to get broather feedback ]
> > > This refines the handling of timeouts for tests running on
> > > systems with slow kernel configurations (kconfigs).
> > > Previously, the max_runtime was multiplied globally when
> > > slow kconfigs were detected, which inadvertently prolonged
> > > the runtime of all tests using max_runtime for control.
> > > This patch corrects that behavior by applying the multiplication
> > > specifically to timeouts, ensuring it only affects the intended
> > > operations without impacting other tests.
> > > Fixes: 2da30df24 ("lib: multiply the max_runtime if detect slow
> > kconfigs")
> > Thanks for handling this, I overlooked it on 27th, thus review it now.
> > Multiplying whole timeout instead of max_runtime helps to hide longer
> > timeout
> > from the test which uses detection via tst_remaining_runtime(). I.e.
> > previously
> > it behaved on slow config as LTP_RUNTIME_MUL=4, now as LTP_TIMEOUT_MUL=4.
> Yes, the benefit of multiplying TIMEOUT (on a slow system) is not only
> to avoid increasing the actual execution time of the test, but also to give
> the system more time to wait for the test to complete the final work.
> Original:
> | -- timeout -- | -- max_runtime -- |
> Previous:
> | -- timeout -- | -------- max_runtime * 4 -------- |
> Now:
> | -------- timeout * 4 -------- | -- max_runtime -- |
Later it'd be nice to document this simple timeline (also with LTP_RUNTIME_MUL
and LTP_TIMEOUT_MUL) in sphinx docs (/** */). Or, it could be in lib/README.md,
but I would like to convert also this page to sphinx.
> > Good idea. IMHO good enough (Martin previously suggested [1] to add a new
> > tst_test flag to identify tests which exit when runtime expires).
> Introduce a new tst_test flag to split the max_runtime into two parts can
> resolve it as well, but the disadvantage might make people hard to
> understand the LTP time controlling, if go with timeout, max_runtime,
> max_exetime
> I think 'simple+uselful' is beautiful unless we need to complex it in the
> future.
+1, I fully agree.
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Some measurements on my Tumbleweed VM, which is detected as slow due
> > CONFIG_LATENCYTOP:
> > TEST | 2da30df24~ |
> > 2da30df24 | this patch
> > --------------------------------------------------|-------------------------------------
> > swapping01.c (calls tst_remaining_runtime()) | 0h 10m 30s | 0h 40m
> > 30s | 0h 12m 00s
> > tst_fuzzy_sync01.c (calls tst_remaining_runtime())| 0h 03m 00s | 0h 10m
> > 30s | 0h 04m 30s
> > tst_cgroup02.c (default timeout 0h 00m 30s) | 0h 00m 30s | 0h 00m
> > 30s | 0h 02m 00s
> > test_runtime01.c (.max_runtime = 4, calls | 0h 00m 34s | 0h 00m
> > 46s | 0h 02m 04s
> > tst_remaining_runtime())
> > starvation.c (calls tst_remaining_runtime() only | 0h 01m 05s | 0h 02m
> > 50s | 0h 02m 34s
> > to detect failure) |
> > => Tests which call tst_remaining_runtime() runs slightly longer, but IMHO
> > that's OK. Other tests (regardless if with the default runtime or these
> > which
> > set .max_runtime) run 4* longer as expected.
> > Tested-by: Petr Vorel <pvorel@suse.cz>
> The longer time is not because call tst_remaining_runtime(), it just comes
> from
> the ' timeout *= 4' while detecting slow configs, as you can see, the
> original default
> timeout is 30s, and with multiple 4 it become 120s (which is +2mins), all
> the test with
> this patch shows that 2 more mins there.
> But, that does not mean the test executing time is really adding 2 minutes,
> it just
> means having that timeout value. We need to use `time ./swapping01` to
> evaluate the real test time, and I didn't find any more delay with this
> method :).
Yes, I noticed that (measuring just test_runtime01.c, where it's nicely
visible).
> Thanks for the comparison, actually I did some tests for RHEL and got a
> good result.
I'm OK with whole result. I'd be happier if we could avoid TCONF of starvation,
but let's discuss this on that patch.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-03 7:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 7:22 [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs Li Wang
2024-12-22 7:22 ` [LTP] [PATCH 2/2] starvation: skip test on slow kernel Li Wang
2025-01-02 12:56 ` Petr Vorel
2025-01-02 14:31 ` Petr Vorel
2025-01-03 7:53 ` Li Wang
2025-01-02 12:43 ` [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs Petr Vorel
2025-01-03 5:00 ` Li Wang
2025-01-03 7:06 ` Petr Vorel [this message]
2025-01-03 7:33 ` Petr Vorel
2025-01-03 7:58 ` Li Wang
2025-01-03 15:48 ` [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigsD Cyril Hrubis
2025-01-04 3:38 ` Li Wang
2025-01-06 9:35 ` Petr Vorel
2025-01-06 12:10 ` Cyril Hrubis
2025-01-06 12:52 ` Petr Vorel
2025-01-06 13:39 ` Cyril Hrubis
2025-01-06 15:36 ` Petr Vorel
2025-01-06 16:19 ` Cyril Hrubis
2025-01-07 5:37 ` Li Wang
2025-01-07 6:28 ` Li Wang
2025-01-07 12:42 ` Cyril Hrubis
2025-01-07 16:49 ` Petr Vorel
2025-01-08 1:47 ` Li Wang
2025-01-08 2:51 ` Li Wang
2025-01-06 16:03 ` Martin Doucha
2025-01-06 16:21 ` Cyril Hrubis
2025-01-06 16:49 ` Martin Doucha
2025-01-15 22:41 ` [LTP] [REGRESSION] Broken tests using tst_net.sh by 893ca0abe7 (was: [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs) Petr Vorel
2025-01-16 6:54 ` Li Wang
2025-01-16 8:35 ` Petr Vorel
2025-01-16 8:38 ` Petr Vorel
2025-01-16 12:10 ` Li Wang
2025-01-16 12:13 ` Li Wang
2025-01-16 13:13 ` Petr Vorel
2025-01-16 12:56 ` Petr Vorel
2025-01-20 9:07 ` [LTP] [REGRESSION] pidns05 timeout " Petr Vorel
2025-01-20 9:11 ` Petr Vorel
2025-01-20 10:18 ` Li Wang
2025-01-20 12:29 ` Cyril Hrubis
2025-01-20 13:03 ` Petr Vorel
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=20250103070634.GA186396@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
/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