The thread under the DPDK is called the EAL thread.
The EAL thread is bound to the CPU core by default, so there are some real-time, low-computational tasks that monopolize the core as a waste, presumably looking for some of the following solutions.
1. DPDK Serivce Core
You can achieve the N to m mapping between workload and the core.
is to provide a set of core implementation serivce tasks, service as the name implies is a short-term task, how short-term task application scenario, applicable.
[DPDK] Service core
2. Lthread,
You can achieve the N to m mapping between workload and the core.
DPDK's example provides a lightweight thread solution called Lthread.
The feature is the use of collaborative thread scheduling, about preemptive task scheduling and collaborative task mobility, see:
43340629
Documentation for Lthread:
Https://dpdk.org/doc/guides/sample_app_ug/performance_thread.html#the-l-thread-subsystem
1. This library is not in the main code of the DPDK, there will be a stability problem.
2. Because it is a collaborative task scheduling, the logical implementation of each thread should have some attention.
3. Co-process
No detailed study, can refer to:
http://www.yeolar.com/note/2013/02/17/coroutines/
Https://coolshell.cn/articles/10975.html
Library's official site: http://dunkels.com/adam/pt/
4. Pthread
The normal OS thread.
The feature is that many RTE dependencies are not available.
CPU affinity: I thought the bindings for the CPU could not specify a group. Actually, it's possible.
CPU affinity is a scheduling attribute (scheduler property) that can "bind" a process to one or a set of CPUs.
Https://www.cnblogs.com/LubinLew/p/cpu_affinity.html
So, the biggest difference between 4 and above 1, 2 is the inability to use EAL's environmental dependencies.
┬─[[email protected]:~]─[: pm]╰─>$ man sched_setaffinity
[DPDK] DPDK Multi-threaded Task Scheduler