[PATCH] eal/windows: fix data race when creating threads

Thomas Monjalon thomas at monjalon.net
Wed Mar 30 19:04:29 CEST 2022


10/03/2022 17:19, Dmitry Kozlyuk:
> Hi Tyler,
> 
> 2022-03-09 23:35 (UTC-0800), Tyler Retzlaff:
> > create lcore worker threads suspended and then subsequently resume to
> > allow &lcore_config[i].thread_id be stored before eal_thread_loop
> > execution.
> > 
> > Fixes: 53ffd9f080fc ("eal/windows: add minimum viable code")
> > Cc: anand.rawat at intel.com
> > Cc: stable at dpdk.org
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> 
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> 
> It takes some effort to correlate &lcore_config[i].thread_id
> with the code in the patch and knowledge of CreateThread()
> to understand the root cause.
> I suggest prepending an explanation to your commit message:
> 
> 	eal_thread_loop() uses lcore_config[i].thread_id,
> 	which is stored upon the return from CreateThread().
> 	Per documentation, eal_thread_loop() can start
> 	before CreateThread() returns and the ID is stored.

There was now reply to this suggestion after 3 weeks,
so I've decided to include it.

Applied, thanks.







More information about the dev mailing list