* [LTP] [PATCH] controllers/cpuacct_task: Increase execution time to 100ms
@ 2026-08-10 3:39 Wake Liu via ltp
2026-08-10 3:55 ` [LTP] " linuxtestproject.agent
0 siblings, 1 reply; 2+ messages in thread
From: Wake Liu via ltp @ 2026-08-10 3:39 UTC (permalink / raw)
To: ltp; +Cc: Wake Liu
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.
Increase the execution time to 100ms to ensure that the process runs
long enough to register a non-zero CPU usage, reducing flakiness of the
test.
Signed-off-by: Wake Liu <wakel@google.com>
---
testcases/kernel/controllers/cpuacct/cpuacct_task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_task.c b/testcases/kernel/controllers/cpuacct/cpuacct_task.c
index 677d6d401..9519bd9b3 100644
--- a/testcases/kernel/controllers/cpuacct/cpuacct_task.c
+++ b/testcases/kernel/controllers/cpuacct/cpuacct_task.c
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
return 1;
}
- struct itimerval it = {.it_value = {.tv_sec = 0, .tv_usec = 10000}};
+ struct itimerval it = {.it_value = {.tv_sec = 0, .tv_usec = 100000}};
setitimer(ITIMER_VIRTUAL, &it, NULL);
for (;;);
--
2.55.0.654.g21b8a5bc05-goog
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] controllers/cpuacct_task: Increase execution time to 100ms
2026-08-10 3:39 [LTP] [PATCH] controllers/cpuacct_task: Increase execution time to 100ms Wake Liu via ltp
@ 2026-08-10 3:55 ` linuxtestproject.agent
0 siblings, 0 replies; 2+ messages in thread
From: linuxtestproject.agent @ 2026-08-10 3:55 UTC (permalink / raw)
To: Wake Liu; +Cc: ltp
Hi Wake,
On Aug 10, 2026, Wake Liu wrote:
> controllers/cpuacct_task: Increase execution time to 100ms
> + struct itimerval it = {.it_value = {.tv_sec = 0, .tv_usec = 100000}};
Could this avoid increasing every helper's CPU time tenfold? The
cpuacct_100_100 runtest case starts 10,000 helpers, so this requires at least
1,000 aggregate CPU seconds. The shell harness has a 300-second default
timeout, which makes that case time out on systems restricted to three or
fewer CPUs, before accounting for setup and process-management overhead.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-10 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 3:39 [LTP] [PATCH] controllers/cpuacct_task: Increase execution time to 100ms Wake Liu via ltp
2026-08-10 3:55 ` [LTP] " linuxtestproject.agent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox