[DPDK] DPDK Multi-threaded Task Scheduler

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.