Go to file
Tyler Retzlaff ca04c78b62 eal: get/set thread priority per thread identifier
Add functions for setting and getting the priority of a thread.
Priorities on multiple platforms are similarly determined by a priority
value and a priority class/policy.

Currently in DPDK most threads operate at the OS-default priority level
but there are cases when increasing the priority is useful. For
example, high performance applications may require elevated priority
levels.

For these reasons, EAL will expose two priority levels which are named
suggestively "normal" and "realtime_critical" and are computed as
follows:

  On Linux, the following mapping is created:
    RTE_THREAD_PRIORITY_NORMAL corresponds to
      * policy SCHED_OTHER
      * priority value:   (sched_get_priority_min(SCHED_OTHER) +
			   sched_get_priority_max(SCHED_OTHER))/2;
    RTE_THREAD_PRIORITY_REALTIME_CRITICAL corresponds to
      * policy SCHED_RR
      * priority value: sched_get_priority_max(SCHED_RR);

  On Windows, the following mapping is created:
    RTE_THREAD_PRIORITY_NORMAL corresponds to
      * class NORMAL_PRIORITY_CLASS
      * priority THREAD_PRIORITY_NORMAL
    RTE_THREAD_PRIORITY_REALTIME_CRITICAL corresponds to
      * class REALTIME_PRIORITY_CLASS (when running with privileges)
      * class HIGH_PRIORITY_CLASS (when running without privileges)
      * priority THREAD_PRIORITY_TIME_CRITICAL

Note that on Linux the resulting priority value will be 0, in
accordance to the documentation that mention the value should be 0 for
SCHED_OTHER policy.

Signed-off-by: Narcisa Vasile <navasile@linux.microsoft.com>
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-06-07 13:33:14 +02:00
.ci ci: build some job with ASan 2022-05-11 14:05:57 +02:00
.github/workflows ci: build some job with ASan 2022-05-11 14:05:57 +02:00
app eal: add seqlock 2022-06-07 13:33:14 +02:00
buildtools build: fix build on FreeBSD with Meson 0.61.1 2022-03-08 16:37:22 +01:00
config config/arm: disable SVE ACLE for CN10K 2022-06-02 00:36:35 +02:00
devtools ethdev: add telemetry command for module EEPROM 2022-05-31 16:30:30 +02:00
doc eal: add seqlock 2022-06-07 13:33:14 +02:00
drivers dma/idxd: add generic option for queue config 2022-06-07 12:46:12 +02:00
examples examples/pipeline: fix build 2022-06-07 13:12:19 +02:00
kernel kni: fix build 2022-06-06 12:49:51 +02:00
lib eal: get/set thread priority per thread identifier 2022-06-07 13:33:14 +02:00
license lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
usertools usertools/devbind: support virtio block device 2022-06-01 11:50:10 +02:00
.editorconfig devtools: clarify that lines up to 100 characters are ok 2021-11-25 11:51:24 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add eventdev feature matrices 2021-11-26 16:29:25 +01:00
.travis.yml version: 22.07-rc0 2022-03-21 13:56:40 +01:00
ABI_VERSION version: 22.07-rc0 2022-03-21 13:56:40 +01:00
MAINTAINERS eal: add seqlock 2022-06-07 13:33:14 +02:00
Makefile build: create dummy Makefile 2020-09-07 23:51:57 +02:00
meson_options.txt config: add option for atomic mbuf reference counting 2021-10-25 17:53:30 +02:00
meson.build app/testpmd: register driver specific commands 2022-05-31 17:09:12 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 22.07-rc0 2022-03-21 13:56:40 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org