All of lore.kernel.org
 help / color / mirror / Atom feed
* [libevl][PATCH 1/2] tests: sched-quota-accuracy: Augment workload with busy-spinning
@ 2026-06-14 19:36 Jan Kiszka
  2026-06-14 19:37 ` [libevl][PATCH 2/2] tests: sched-quota-accuracy: Add preempting FIFO thread Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2026-06-14 19:36 UTC (permalink / raw)
  To: Xenomai, Philippe Gerum

From: Jan Kiszka <jan.kiszka@siemens.com>

This increases calibration accuracy, specifically over virtual
environments.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 tests/sched-quota-accuracy.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/sched-quota-accuracy.c b/tests/sched-quota-accuracy.c
index 9ca496d..278ff1b 100644
--- a/tests/sched-quota-accuracy.c
+++ b/tests/sched-quota-accuracy.c
@@ -94,6 +94,13 @@ static const struct option options[] = {
 static unsigned long __attribute__(( noinline ))
 __do_work(unsigned long count)
 {
+	struct timespec now, to;
+	int ret;
+
+	__Tcall_assert(ret, evl_read_clock(EVL_CLOCK_MONOTONIC, &now));
+	timespec_add_ns(&to, &now, 100);
+	while (timespec_sub_ns(&to, &now) > 0)
+		__Tcall_assert(ret, evl_read_clock(EVL_CLOCK_MONOTONIC, &now));
 	return count + 1;
 }
 
-- 
2.47.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-16  6:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 19:36 [libevl][PATCH 1/2] tests: sched-quota-accuracy: Augment workload with busy-spinning Jan Kiszka
2026-06-14 19:37 ` [libevl][PATCH 2/2] tests: sched-quota-accuracy: Add preempting FIFO thread Jan Kiszka
2026-06-16  6:09   ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.