From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Van Haaren, Harry" Subject: Re: [PATCH v6 2/2] eal: add asynchronous request API to DPDK IPC Date: Wed, 28 Mar 2018 08:22:41 +0000 Message-ID: References: <3396888.LEadjR7LpM@xps> <2563064.olffpIeeN1@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Burakov, Anatoly" , "dev@dpdk.org" , "Ananyev, Konstantin" To: Thomas Monjalon , "Tan, Jianfeng" Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id DB0432C18 for ; Wed, 28 Mar 2018 10:22:44 +0200 (CEST) In-Reply-To: <2563064.olffpIeeN1@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, March 28, 2018 8:30 AM > To: Tan, Jianfeng > Cc: Burakov, Anatoly ; dev@dpdk.org; Ananyev, > Konstantin ; Van Haaren, Harry > > Subject: Re: [dpdk-dev] [PATCH v6 2/2] eal: add asynchronous request API = to > DPDK IPC >=20 > 28/03/2018 04:08, Tan, Jianfeng: > > Hi Thomas , > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > 27/03/2018 15:59, Anatoly Burakov: > > > > Under the hood, we create a separate thread to deal with replies to > > > > asynchronous requests, that will just wait to be notified by the > > > > main thread, or woken up on a timer. > > > > > > I really don't like that a library is creating a thread. > > > We don't even know where the thread is created (which core). > > > Can it be a rte_service? or in the interrupt thread? > > > > Agree that we'd better not adding so many threads in a library. > > > > I was considering to merge all the threads into the interrupt thread, > however, we don't have an interrupt thread in freebsd. Further, we don't > implement alarm API in freebsd. That's why I tend to current implementati= on, > and optimize it later. >=20 > I would prefer we improve the current code now instead of polluting more > with more uncontrolled threads. >=20 > > For rte_service, it may be not a good idea to reply on it as it needs > explicit API calls to setup. >=20 > I don't see the issue of the explicit API. > The IPC is a new service. Although I do like to see new services, if we want to enable "core" dpdk fu= nctionality with Services, we need a proper designed solution for that. Ser= vice cores is not intended for "occasional" work - there is no method to bl= ock and sleep on a specific service until work becomes available, so this w= ould imply a busy-polling. Using a service (hence busy polling) for rte_mal= loc()-based memory mapping requests is inefficient, and total overkill :) For this patch I suggest to use some blocking-read capable mechanism. The above said, in the longer term it would be good to have a design that a= llows new file-descriptors to be added to a "dpdk core" thread, which perfo= rms occasional lengthy work if the FD has data available.