From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v4 05/24] eal: support mp task be invoked in a separate task Date: Tue, 26 Jun 2018 10:02:50 +0100 Message-ID: <167506ed-380a-898e-2f52-20be0178a49b@intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180626070832.3055-1-qi.z.zhang@intel.com> <20180626070832.3055-6-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: 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: Qi Zhang , thomas@monjalon.net Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4CBF71B426 for ; Tue, 26 Jun 2018 11:02:55 +0200 (CEST) In-Reply-To: <20180626070832.3055-6-qi.z.zhang@intel.com> 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" 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) -- Thanks, Anatoly