From patchwork Tue Jun 26 10:53:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 41557 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7835F1B546; Tue, 26 Jun 2018 12:53:33 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id DAE251B45C for ; Tue, 26 Jun 2018 12:53:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 03:53:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="67358854" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 26 Jun 2018 03:53:19 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w5QArJXO026432; Tue, 26 Jun 2018 11:53:19 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w5QArIqV021174; Tue, 26 Jun 2018 11:53:18 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w5QArIWY021170; Tue, 26 Jun 2018 11:53:18 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, thomas@monjalon.net, bruce.richardson@intel.com, qi.z.zhang@intel.com Date: Tue, 26 Jun 2018 11:53:11 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 0/7] Remove asynchronous IPC thread X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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