From: Stephen Hemminger <stephen@networkplumber.org>
To: techboard@dpdk.org
Cc: dev@dpdk.org
Subject: rte_control event API?
Date: Thu, 1 May 2025 08:06:30 -0700 [thread overview]
Message-ID: <20250501080630.440a78ba@hermes.local> (raw)
There was recent discussions about drivers creating control threads.
The current drivers that use rte_thread_create_internal_control keeps growing,
but it got me looking at if this could be done better.
Rather than having multiple control threads which have potential conflicts, why not
add a new API that has one control thread and uses epoll. The current multi-process
control thread could use epoll as well. Epoll scales much better and avoids
any possibility of lock scheduling/priority problems.
Some ideas:
- single control thread started (where the current MP thread is started)
- have control_register_fd and control_unregister_fd
- leave rte_control_thread API for legacy uses
Model this after well used libevent library https://libevent.org
Open questions:
- names are hard, using event as name leads to possible confusion with eventdev
- do we need to support:
- multiple control threads doing epoll?
- priorities
- timers?
- signals?
- manual activation?
- one off events?
- could alarm thread just be a control event
- should also have stats and info calls
- it would be good to NOT support as many features as libevent, since
so many options leads to bugs.
next reply other threads:[~2025-05-01 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 15:06 Stephen Hemminger [this message]
2025-05-02 8:56 ` Morten Brørup
2025-05-02 9:08 ` Bruce Richardson
2025-05-02 10:36 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250501080630.440a78ba@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=techboard@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).