From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 05/24] eal: support mp task be invoked in a separate task Date: Tue, 26 Jun 2018 11:24:18 +0200 Message-ID: <3228714.zAXYVjxDgJ@xps> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180626070832.3055-6-qi.z.zhang@intel.com> <167506ed-380a-898e-2f52-20be0178a49b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Qi Zhang , konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com To: "Burakov, Anatoly" Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E260C1B48B for ; Tue, 26 Jun 2018 11:24:20 +0200 (CEST) In-Reply-To: <167506ed-380a-898e-2f52-20be0178a49b@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/06/2018 11:02, Burakov, Anatoly: > On 26-Jun-18 8:08 AM, Qi Zhang wrote: > > We know the limitation that sync IPC can't be invoked in mp handler > > itself which will cause deadlock, the patch introduce new API > > rte_eal_mp_task_add to support mp handler be delegated in a separate > > task. > > > > Signed-off-by: Qi Zhang > > --- > > I would really like to find another solution to this problem. Creating a > new thread per hotplug request seems like an overkill - even more so > than having two threads. Creating a new thread potentially while the > application is working may have other implications (e.g. there's a > non-zero amount of time between thread created and thread affinitized, > which may disrupt hotpaths). > > It seems to me that the better solution would've been to leave the IPC > thread in place. There are two IPC threads in the first place because > there was a circular dependency between rte_malloc and alarm API. My > patch fixes that - so how about we remove *one* IPC thread, but leave > the other one in place? > > Thomas, any thoughts? (quick description - hotplug needs IPC, and > hotplug may need to allocate memory, which also needs IPC, which will > cause a deadlock if IPC is one thread) We can keep one IPC thread until we find a better solution.