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

David Marchand david.marchand at 6wind.com
Tue Mar 8 15:40:55 CET 2016


On Tue, Mar 8, 2016 at 2:57 PM, Van Haaren, Harry
<harry.van.haaren at intel.com> wrote:
>> 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.

Then, those are two different things.
Can you split this into two patches: one for the fix and one for the
new function ?

CCing sergio, who is the multi process maintainer.

Thanks.

-- 
David Marchand


More information about the dev mailing list