Skip to content

Remove asynchronous IPC thread

Anatoly Burakov dpdk-dev 2 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 6 repliesApplied
  2. v18 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Leave IPC thread in place and only remove asynchronous IPC thread

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/7eal/linux: use glibc malloc in alarmlib/librte_eal/linuxapp/eal/eal_alarm.c+4 -50 replies
2/7eal/linux: use glibc malloc in interrupt handlinglib/librte_eal/linuxapp/eal/eal_interrupts.c+6 -80 replies
3/7eal/bsdapp: add interrupt threadlib/librte_eal/bsdapp/eal/eal_interrupts.c+418 -180 replies
4/7eal/bsdapp: add alarm supportlib/librte_eal/bsdapp/eal/eal_alarm.c lib/librte_eal/bsdapp/eal/eal_alarm_private.h lib/librte_eal/bsdapp/eal/eal_interrupts.c+334 -130 replies
5/7eal: bring forward init of interrupt handlinglib/librte_eal/bsdapp/eal/eal.c lib/librte_eal/linuxapp/eal/eal.c+10 -105 replies
6/7ipc: remove IPC thread for async requestslib/librte_eal/common/eal_common_proc.c+70 -1310 replies
7/7doc: document IPC callback limitationsdoc/guides/prog_guide/multi_proc_support.rst+15 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] Remove asynchronous IPC thread

As previously discussed [1], IPC threads need to be removed and their workload moved to interrupt thread. However, due to upcoming changes for multiprocess hotplug, it was decided to leave one IPC thread in place for now to avoid deadlocks on memory allocation attempts [2].

FreeBSD did not have an interrupt thread, nor did it support alarm API. This patchset adds support for both on FreeBSD. FreeBSD interrupt thread is based on kevent, FreeBSD's native event multiplexing mechanism similar to Linux's epoll.

The patchset makes FreeBSD's interrupts and alarm work just enough to suffice for purposes of IPC, however there are really weird problems observed. Specifically, FreeBSD's kevent timers are really slow to trigger for some reason, sleeping on a 10ms timer as much as 200ms before waking up. Interrupt handling on fd's is also a bit flaky.

It has also been observed that both problems go away if we do not affinitize master lcore (by commenting relevant code out [3]). It is not known why these problems are observed, nor it is clear what a solution might entail.

For the purposes of making IPC work and having rudimentary support for alarm and interrupt API's, this patchset works fine. However, because of the above described issues, documentation will not be updated to indicate support for interrupts on FreeBSD at this time.

v1->v2:
- Leave IPC thread in place and only remove asynchronous IPC thread

RFC->v1:
- FreeBSD support

[1] https://patches.dpdk.org/patch/36579/
[2] https://patches.dpdk.org/patch/41512/
[3] https://git.dpdk.org/dpdk/tree/lib/librte_eal/bsdapp/eal/eal.c#n729

Anatoly Burakov (4):
eal/bsdapp: add interrupt thread
eal/bsdapp: add alarm support
ipc: remove IPC thread for async requests
doc: document IPC callback limitations

Jianfeng Tan (3):
eal/linux: use glibc malloc in alarm eal/linux: use glibc malloc in interrupt handling
eal: bring forward init of interrupt handling

 doc/guides/prog_guide/multi_proc_support.rst  |  17 +-
 lib/librte_eal/bsdapp/eal/eal.c               |  10 +-
 lib/librte_eal/bsdapp/eal/eal_alarm.c         | 299 +++++++++++-
 lib/librte_eal/bsdapp/eal/eal_alarm_private.h |  19 +
 lib/librte_eal/bsdapp/eal/eal_interrupts.c    | 455 +++++++++++++++++-
 lib/librte_eal/common/eal_common_proc.c       | 201 +++-----
 lib/librte_eal/linuxapp/eal/eal.c             |  10 +-
 lib/librte_eal/linuxapp/eal/eal_alarm.c       |   9 +-
 lib/librte_eal/linuxapp/eal/eal_interrupts.c  |  14 +-
 9 files changed, 852 insertions(+), 182 deletions(-)
 create mode 100644 lib/librte_eal/bsdapp/eal/eal_alarm_private.h
Signature · 1 line
2.17.1