[dpdk-dev] [PATCH v4] eal: fix proc type auto detection

Burakov, Anatoly anatoly.burakov at intel.com
Mon Aug 12 15:30:40 CEST 2019


On 12-Aug-19 11:21 AM, Van Haaren, Harry wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of David Marchand
>> Sent: Monday, August 12, 2019 11:04 AM
>> To: Burakov, Anatoly <anatoly.burakov at intel.com>
>> Cc: dev <dev at dpdk.org>; Richardson, Bruce <bruce.richardson at intel.com>;
>> Stephen Hemminger <stephen at networkplumber.org>; dpdk stable <stable at dpdk.org>
>> Subject: Re: [dpdk-dev] [PATCH v4] eal: fix proc type auto detection
>>
>> On Wed, Jul 24, 2019 at 6:08 PM Anatoly Burakov
>> <anatoly.burakov at intel.com> wrote:
>>>
>>> Currently, primary process holds an exclusive lock on the config
>>> file, thereby preventing other primaries from spinning up. However,
>>> when the primary dies, the lock is no longer being held, even though
>>> there might be other secondary processes still running.
>>>
>>> The fix is two-fold. First of all, downgrade the primary process's
>>> exclusive lock to a shared lock once we have it. Second of all,
>>> also take out shared locks on the config from the secondaries. We
>>> are using fcntl() locks, which get dropped when the file handle is
>>> closed, so also remove the closure of config file handle.
>>>
>>> Fixes: af75078fece3 ("first public release")
>>> Cc: stable at dpdk.org
>>>
>>> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> 
> 
> Apologies I'm late to the conversation.
> 
> Will the rte_eal_primary_proc_alive() function still detect the primary
> as alive, and not confuse secondaries with primaries in this new method?

Good question, i'll have to investigate. Maybe we'll have to change the 
lock from the fcntl() locks to flock()-based locks.

> 
> Currently, the pri_proc_alive() code uses lockf(fd, F_TEST, 0); to detect
> if a primary is alive. I'm not familiar enough with shared locks to know
> if the new behavior would be consistent with the old.
> 
> -H
> 


-- 
Thanks,
Anatoly


More information about the dev mailing list