From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Xenomai <xenomai@lists.linux.dev>
Subject: Re: [libevl][PATCH] tests: sched-quota: Perform calibration without quota again
Date: Fri, 04 Sep 2026 11:22:20 +0200 [thread overview]
Message-ID: <87cxutfk1f.fsf@xenomai.org> (raw)
In-Reply-To: <b78962e2-2109-49c8-9c88-8acb4b282f67@siemens.com> (Jan Kiszka's message of "Mon, 31 Aug 2026 16:56:35 +0200")
Jan Kiszka <jan.kiszka@siemens.com> writes:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> It defeats the purpose of the test when we calibrate under quota as we
> can no longer compare the actual cap against the configured value.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> tests/sched-quota-accuracy.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/tests/sched-quota-accuracy.c b/tests/sched-quota-accuracy.c
> index 1bf5eb9..ac04449 100644
> --- a/tests/sched-quota-accuracy.c
> +++ b/tests/sched-quota-accuracy.c
> @@ -171,15 +171,15 @@ static void *quota_thread(void *arg)
> __Tcall_assert(t->efd, evl_attach_self("quota-runner:%d.%d",
> getpid(), serial));
>
> + wait_phase(calibration_phase);
> +
> + do_work(t, PERIOD_NS * NR_PERIODS);
> +
> attrs.sched_policy = SCHED_QUOTA;
> attrs.sched_priority = QUOTA_PRIO;
> attrs.sched_quota_group = tgid;
> __Tcall_assert(ret, evl_set_schedattr(t->efd, &attrs));
>
> - wait_phase(calibration_phase);
> -
> - do_work(t, PERIOD_NS * NR_PERIODS);
> -
> wait_phase(accuracy_measurement_phase);
>
> do_work(t, PERIOD_NS * NR_PERIODS);
> @@ -338,7 +338,8 @@ static struct accuracy_results run_quota(void)
> * expressed as a percentage. The closest to the QUOTA_PERCENT
> * target, the better.
> */
> - results.accuracy = ((double)loops_at_accuracy * 100.0) / (double)loops_at_calibration;
> + results.accuracy = 100.0 *
> + ((double)loops_at_accuracy * 100.0 / QUOTA_PERCENT) / (double)loops_at_calibration;
>
> /*
> * Level of noise observed for the disrupted run compared to
> @@ -346,7 +347,8 @@ static struct accuracy_results run_quota(void)
> * run was faster than the calibration one, which would still
> * be correct.
> */
> - results.noise = 100.0 - (((double)loops_with_disruption * 100.0) / (double)loops_at_calibration);
> + results.noise = 100.0 - (100.0 *
> + ((double)loops_with_disruption * 100.0 / QUOTA_PERCENT) / (double)loops_at_calibration);
>
> __Tcall_assert(ret, cleanup_group());
Merged, thanks.
--
Philippe.
prev parent reply other threads:[~2026-09-04 9:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 14:56 [libevl][PATCH] tests: sched-quota: Perform calibration without quota again Jan Kiszka
2026-09-04 9:22 ` Philippe Gerum [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=87cxutfk1f.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=jan.kiszka@siemens.com \
--cc=xenomai@lists.linux.dev \
/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