From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9E2252C18 for ; Tue, 26 Jun 2018 03:19:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2018 18:19:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,272,1526367600"; d="scan'208";a="240245918" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 25 Jun 2018 18:19:28 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Jun 2018 18:19:27 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Tue, 26 Jun 2018 09:19:25 +0800 From: "Zhang, Qi Z" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "Ananyev, Konstantin" , "thomas@monjalon.net" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH 0/8] Remove IPC threads Thread-Index: AQHUBLS2PKFie3txNkSRAR62oKRw56RxvtGA Date: Tue, 26 Jun 2018 01:19:25 +0000 Message-ID: <039ED4275CED7440929022BC67E706115323E1FC@SHSMSX103.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzhiN2VlZWUtYmVhZS00NmJiLTgzMmYtMzlkMzk5NGU1ZDg5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZHVRRXMzUnNcL3B0WTdJTEFXNVJ1OUtTM09UdFVmQmZWQVQ3YmczY1lMZmdwQ1dQUGN5KzhJSFhrRlNKekNBd3YifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/8] Remove IPC threads 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: , X-List-Received-Date: Tue, 26 Jun 2018 01:19:31 -0000 Hi Anatoly and Thomas: Sorry for raise this late, but seems merge mp thread into interrupt thread = gives problem to enable hotplug on secondary [1]. The issue is, when secondary want to attach a share device, it send request= to primary Then primary is running in mp callback (mp thread) to attach device, it wil= l call rte_malloc which get chance to increase heap that will do sync IPC, You know, this is the limitation we can't do sync IPC in mp thread itself. = so the solution is try to move real work to a separate thread which has no = limitation to do sync IPC,=20 and interrupt thread is the good candidate, because we just need to call rt= e_eal_set_alarm and we don't need to worry about the execution sequence. But if we merge mp thread into interrupt thread, the solution will not work= , we may need to create specific temporal thread to handle callback, but th= is looks like some re-build which we already have. So I think we need to revisit if we need to merge the thread before we have= a good solution for such kind of issue. Thanks Qi [1] https://mails.dpdk.org/archives/dev/2018-June/105018.html > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Friday, June 15, 2018 10:25 PM > To: dev@dpdk.org > Cc: Ananyev, Konstantin ; > thomas@monjalon.net; Richardson, Bruce > Subject: [dpdk-dev] [PATCH 0/8] Remove IPC threads >=20 > As previously discussed [1], IPC threads need to be removed and their > workload moved to interrupt thread. >=20 > FreeBSD did not have an interrupt thread, nor did it support alarm API. T= his > patchset adds support for both on FreeBSD. FreeBSD interrupt thread is ba= sed > on kevent, FreeBSD's native event multiplexing mechanism similar to Linux= 's > epoll. >=20 > The patchset makes FreeBSD's interrupts and alarm work just enough to > suffice for purposes of IPC, however there are really weird problems obse= rved. > 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. >=20 > It has also been observed that both problems go away if we do not affinit= ize > master lcore (by commenting relevant code out [2]). It is not known why t= hese > problems are observed, nor it is clear what a solution might entail. >=20 > 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. >=20 > [1] http://dpdk.org/dev/patchwork/patch/36579/ > [2] http://dpdk.org/browse/dpdk/tree/lib/librte_eal/bsdapp/eal/eal.c#n729 >=20 > Anatoly Burakov (4): > ipc: remove IPC thread for async requests > eal/bsdapp: add interrupt thread > eal/bsdapp: add alarm support > ipc: remove main IPC thread >=20 > Jianfeng Tan (4): > eal/linux: use glibc malloc in alarm > eal/linux: use glibc malloc in interrupt handling > eal: bring forward init of interrupt handling > eal: add IPC type for interrupt thread >=20 > 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 | 460 +++++++++++++++++- > lib/librte_eal/common/eal_common_proc.c | 243 ++++----- > .../common/include/rte_eal_interrupts.h | 1 + > 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 | 19 +- > test/test/test_interrupts.c | 29 +- > 10 files changed, 899 insertions(+), 200 deletions(-) create mode 10064= 4 > lib/librte_eal/bsdapp/eal/eal_alarm_private.h >=20 > -- > 2.17.1