[dpdk-dev] [PATCH v4 05/24] eal: support mp task be invoked in a separate task

Burakov, Anatoly anatoly.burakov at intel.com
Tue Jun 26 11:02:50 CEST 2018


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 <qi.z.zhang at intel.com>
> ---

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


More information about the dev mailing list