[PATCH v2] test/lcores: reduce cpu consumption
Morten Brørup
mb at smartsharesystems.com
Thu Mar 7 20:25:37 CET 2024
> From: Tyler Retzlaff [mailto:roretzla at linux.microsoft.com]
> Sent: Thursday, 7 March 2024 19.37
>
> On Thu, Mar 07, 2024 at 07:06:26PM +0100, David Marchand wrote:
> > On Thu, Mar 7, 2024 at 3:16 PM David Marchand
> <david.marchand at redhat.com> wrote:
> > >
> > > Busy looping on RTE_MAX_LCORES threads is too heavy in some CI or
> build
> > > systems running the fast-test testsuite.
> > > Ask for a reschedule at the threads synchronisation points.
> > >
> > > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > > Acked-by: Luca Boccassi <bluca at debian.org>
> >
> > Ideally, this test should be rewritten with some kind of OS-agnostic
> > synchronisation/scheduling API (mutex?).
> > But I think it will be enough for now.
>
> It's okay, I'll eventually get to this :)
>
For future reference, it seems SwitchToThread() [1] resembles sched_yield() [2].
[1]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-switchtothread
[2]: https://linux.die.net/man/2/sched_yield
> >
> > I updated the code comment as requested by Stephen.
> >
> > Applied, thanks.
> >
> > --
> > David Marchand
More information about the dev
mailing list