W dniu 30.04.2020 o 04:54, Phil Yang pisze: >> -----Original Message----- >> From: Lukasz Wojciechowski <l.wojciec...@partner.samsung.com> >> Sent: Thursday, April 30, 2020 5:32 AM >> To: Phil Yang <phil.y...@arm.com>; Harry van Haaren >> <harry.van.haa...@intel.com>; Jerin Jacob >> <jerin.ja...@caviumnetworks.com> >> Cc: dev@dpdk.org; sta...@dpdk.org; nd <n...@arm.com> >> Subject: Re: [dpdk-dev] [PATCH] eal: fix lcore state bug >> >> Hi Phil, >> >> W dniu 29.04.2020 o 17:07, Phil Yang pisze: >>> Hi Lukasz, >>> >>>> -----Original Message----- >>>> From: dev <dev-boun...@dpdk.org> On Behalf Of Lukasz Wojciechowski >>>> Sent: Tuesday, April 28, 2020 9:22 AM >>>> To: Harry van Haaren <harry.van.haa...@intel.com>; Jerin Jacob >>>> <jerin.ja...@caviumnetworks.com> >>>> Cc: dev@dpdk.org; l.wojciec...@partner.samsung.com; >> sta...@dpdk.org >>>> Subject: [dpdk-dev] [PATCH] eal: fix lcore state bug >>>> >>>> The rte_service_lcore_reset_all function stops execution of services >>>> on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE. >>>> However the thread loop for slave lcores (eal_thread_loop) distincts >> these >>>> roles to set lcore state after processing delegated function. >>>> It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE. >>>> So changing the role to RTE before stopping work in slave lcores >>>> causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait >>>> must be run after rte_service_lcore_reset_all to bring back lcores to >>>> launchable (WAIT) state. >>> Is that make sense to call rte_eal_mp_wait_lcore() inside >> rte_serice_lcore_reset_all() ? >> >> yeah, I thought about it and in my opinion the answer is no, because if >> the function run on slave lcore is in FINISHED state it means, that >> someone can still read the value returned by the function and the only >> one who can be interested in the value is the one that delegated the >> service. >> >> If we will wait for lcores to end their jobs, read the values and switch >> them to WAIT state, the values will be lost. The application might need >> to read them. We cannot take this possibility from it. > Yeah. I think that is a good point. > > Reviewed-by: Phil Yang <phil.y...@arm.com> Thank you > >>> <snip> >>> >>> Thanks, >>> Phil >> -- >> >> Lukasz Wojciechowski >> Principal Software Engineer >> >> Samsung R&D Institute Poland >> Samsung Electronics >> Office +48 22 377 88 25 >> l.wojciec...@partner.samsung.com
-- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciec...@partner.samsung.com