Thread (30 messages) 30 messages, 7 authors, 2021-10-25

Re: [dpdk-dev] [RFC v2] eal: simplify the implementation of rte_ctrl_thread_create

From: Honnappa Nagarahalli <hidden>
Date: 2021-09-01 22:21:52

<snip>
quoted
quoted
On 2021-08-24 23:30, Stephen Hemminger wrote:
quoted
On Tue, 24 Aug 2021 20:03:03 +0000
Honnappa Nagarahalli [off-list ref] wrote:
quoted
quoted
One difference between this implementation and the previous one is
this busy loop. rte_pause() relaxes the cpu, but will not make the
calling thread to sleep and wait for the sync event. So here we
can spin a quite long time until the other thread is scheduled by the OS.
Yes, this is a difference. We could add a microsleep to allow for
the OS to
un-schedule the current thread.
quoted
Why not use sched_yield() here?
The man page is not exactly encouraging the use sched_yield on CFS.
Sorry, what is CFS?
There are already several uses of sched_yield in the code.
CFS is the Linux best-effort scheduler and default scheduling policy, and likely
used by most DPDK applications.
Thanks, I read some of the issues. If sched_yield has to be used, the API needs to be implemented for Linux/Windows/FreeBSD. From my perspective, this API is called mostly during init time. I do not think it is worth duplicating the code and maintaining it. I would prefer to go with usleep.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help