[PATCH v6 1/1] eal/unix: allow creating thread with real-time priority
Stephen Hemminger
stephen at networkplumber.org
Mon Oct 7 21:27:19 CEST 2024
On Fri, 27 Oct 2023 10:08:52 +0200
Thomas Monjalon <thomas at monjalon.net> wrote:
> When adding an API for creating threads,
> the real-time priority has been forbidden on Unix.
>
> There is a known issue with ring behaviour,
> but it should not be completely forbidden.
>
> Real-time thread can block some kernel threads on the same core,
> making the system unstable.
> That's why a sleep is added in the test thread,
> and a warning is logged when using real-time priority.
>
> Fixes: ca04c78b6262 ("eal: get/set thread priority per thread identifier")
> Fixes: ce6e911d20f6 ("eal: add thread lifetime API")
> Fixes: a7ba40b2b1bf ("drivers: convert to internal control threads")
> Cc: stable at dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
> ---
If RT threads are allowed on Linux, then a couple more things are necessary.
1. A functional test, maybe something with two threads exchanging packets
ping-pong or something similar and show that the test does not crash
or hang the CI system.
2. Sufficient documentation in programmers guide. Probably need a whole
chapter on what is RT, when to use RT, and caveats.
Make it clear to users that RT is not a faster mode, it is more about
working with existing RT applications.
More information about the dev
mailing list