[dpdk-dev] [PATCH v6] eal: add function to check if primary proc alive

Van Haaren, Harry harry.van.haaren at intel.com
Tue Mar 8 14:57:49 CET 2016


> From: David Marchand [mailto:david.marchand at 6wind.com]
> >> The issue is that if a secondary process is initialized, it holds a read
> >> lock on  /var/run/.rte_config  and this prevents a primary from starting.
> >
> > The new function is advertised as a monitoring feature.
> > But it seems to be also a workaround for an ordering issue when starting
> > primary and secondary processes concurrently, right?
> 
> +1

You are correct, the function rte_eal_primary_proc_alive() added here is
for monitoring if there is a primary process alive.

The rte_eal_mcfg_complete() function call in rte_eal_init() is delayed
to avoid a race-condition between secondary and primary processes.
This race-condition occurs when two processes probe the PCI devices
at the same time.

Delaying the rte_eal_mcfg_complete() call until after the primary has
finished rte_eal_pci_probe() ensures that this race condition is avoided.

-Harry


More information about the dev mailing list