[LTP] [PATCH 2/2] memcg: scale memcontrol03 checkpoint timeouts for slow kernels
Cyril Hrubis
chrubis@suse.cz
Wed Apr 1 12:44:11 CEST 2026
Hi!
> > +#define CHECKPOINT_TIMEOUT_MS (tst_multiply_timeout(10) * 1000)
>
> Wouldn't it make more sense to use the tst_multiply_timeout() directly
> in the checkpoint library and hide that complexity from the tests?
If I'm not missing something it should be as easy as:
diff --git a/lib/tst_checkpoint.c b/lib/tst_checkpoint.c
index f2faf6563..82f6ab87c 100644
--- a/lib/tst_checkpoint.c
+++ b/lib/tst_checkpoint.c
@@ -37,6 +37,8 @@ int tst_checkpoint_wait(unsigned int id, unsigned int msec_timeout)
return -1;
}
+ msec_timeout = tst_multiply_timeout(msec_timeout);
+
timeout.tv_sec = msec_timeout/1000;
timeout.tv_nsec = (msec_timeout%1000) * 1000000;
@@ -61,6 +63,8 @@ int tst_checkpoint_wake(unsigned int id, unsigned int nr_wake,
return -1;
}
+ msec_timeout = tst_multiply_timeout(msec_timeout);
+
for (;;) {
waked += syscall(SYS_futex, &tst_futexes[id], FUTEX_WAKE,
INT_MAX, NULL);
And with that ALL checkpoints timeouts will be increased on slow
machines.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list