From: Petr Vorel <pvorel@suse.cz>
To: Alessandro Carminati <acarmina@redhat.com>
Cc: Alessandro Carminati <alessandro.carminati@gmail.com>,
ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] cfs-scheduler/starvation.c: Skip test on realtime kernels
Date: Tue, 21 Jan 2025 09:56:08 +0100 [thread overview]
Message-ID: <20250121085608.GA890303@pevik> (raw)
In-Reply-To: <CAGegRW72RcV+L68y+3prAajqvSfHsZpTrN4+sb0ErcRZ6cOsnA@mail.gmail.com>
Hi Alessandro,
> Hello Petr,
...
> > LGTM. Could you please test if starvation.c worked previously?
> > Or was it always broken?
> Before submitting the patch, I tested the case in various environments.
> One thing that puzzled me for a while was the test's high sensitivity to
> latencies.
> While it works correctly on bare-metal systems under the intended
> conditions with the CFS scheduler, running it on a real-time kernel
> or in a virtualized/emulated environment is likely to cause the
> test to fail.
> This patch addresses the real-time kernel scenario, which is relatively
> easier to handle.
> In a separate RFC patch I plan to send, I would like to ask the
> community for guidance on how to handle the virtualization/emulation
> environment issue.
Thanks, reply send.
FYI there is a git freeze before upcoming release, only fixes are merged.
https://lore.kernel.org/ltp/5202b2ba-a13e-4250-97c5-937dde849975@suse.com/T/#t
But fixes like this should go in (I'll leave the decision to Cyril).
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > > +int tst_check_preempt_rt(void)
> > > +{
> > > + struct utsname uval;
> > > +
> > > + uname(&uval);
> > > + if (strstr(uval.version, "PREEMPT_RT"))
> > > + return -1;
> > > + return 0;
> > > +}
> > > diff --git a/testcases/kernel/sched/cfs-scheduler/starvation.c b/testcases/kernel/sched/cfs-scheduler/starvation.c
> > > index 901556a7b..c620c9c3e 100644
> > > --- a/testcases/kernel/sched/cfs-scheduler/starvation.c
> > > +++ b/testcases/kernel/sched/cfs-scheduler/starvation.c
> > > @@ -82,6 +82,9 @@ static void setup(void)
> > > CPU_ZERO(&mask);
> > > + if (tst_check_preempt_rt())
> > > + tst_brk(TCONF, "This test is not designed for the RT kernel");
> > nit: I would move it above CPU_ZERO().
> Ok, I'll fix it in the v2
Thanks!
> > NOTE: we should also move tst_has_slow_kconfig() check to be at the top of
> > setup(). But that's unrelated. Also at least on Tumbleweed and SLES which get
> > detected as slow due CONFIG_LATENCYTOP test was worked before.
> Want me to address this issue?
Already done:
https://patchwork.ozlabs.org/project/ltp/patch/20250120143420.815363-1-pvorel@suse.cz/
Kind regards,
Petr
> > Kind regards,
> > Petr
> Cheers
> Alessandro
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-01-21 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 8:50 [LTP] [PATCH] cfs-scheduler/starvation.c: Skip test on realtime kernels Alessandro Carminati
2025-01-20 9:46 ` Petr Vorel
2025-01-20 10:21 ` Alessandro Carminati
2025-01-21 8:56 ` Petr Vorel [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=20250121085608.GA890303@pevik \
--to=pvorel@suse.cz \
--cc=acarmina@redhat.com \
--cc=alessandro.carminati@gmail.com \
--cc=ltp@lists.linux.it \
/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 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.