From: Cyril Hrubis <chrubis@suse.cz>
To: Wake Liu <wakel@google.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] controllers/cpuacct: Dynamically adjust cpuacct_task execution time
Date: Fri, 28 Aug 2026 14:15:57 +0200 [thread overview]
Message-ID: <apF7_VcBfoEMHqrz@yuki.lan> (raw)
In-Reply-To: <20260812074413.3159992-1-wakel@google.com>
Hi!
> The test helper cpuacct_task currently runs for 10ms (virtual time)
> before exiting. On some systems (e.g. fast virtual machines or under
> heavy load), this short duration can lead to 0 usage being recorded in
> cpuacct.usage cgroup file due to timing resolution or scheduling delay,
> especially when running small configurations like cpuacct_1_1.
I was starting at the test for a while and I do not see how this could
happen.
The test uses ITMER_VIRTUAL which is counts user CPU time, so the kernel
guarantees that the loop would consume CPU for 10ms, regardless of the
CPU speed.
At the same time the cpuacct.sh script waits for all the processes
before it checks the usage counters. So under heavy load the test should
run longer but shouldn't fail.
All in all it should be guaranteed that the usage should be >= 10ms.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-08-28 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 4:17 [LTP] [PATCH] controllers/cpuacct: Dynamically adjust cpuacct_task execution time Wake Liu via ltp
2026-08-10 5:28 ` [LTP] " linuxtestproject.agent
2026-08-10 8:30 ` [LTP] [PATCH] " Wake Liu via ltp
2026-08-10 9:22 ` [LTP] " linuxtestproject.agent
2026-08-11 10:15 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-08-12 7:44 ` [LTP] [PATCH v3] " Wake Liu via ltp
2026-08-12 8:24 ` [LTP] " linuxtestproject.agent
2026-08-28 12:15 ` Cyril Hrubis [this message]
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=apF7_VcBfoEMHqrz@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wakel@google.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