From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH v6] eal: add function to check if primary proc alive Date: Tue, 8 Mar 2016 15:40:55 +0100 Message-ID: References: <1457350669-32582-1-git-send-email-harry.van.haaren@intel.com> <2251445.Z6GIcehbaX@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" To: "Van Haaren, Harry" Return-path: Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by dpdk.org (Postfix) with ESMTP id D959E2BF4 for ; Tue, 8 Mar 2016 15:41:15 +0100 (CET) Received: by mail-ob0-f173.google.com with SMTP id m7so15398312obh.3 for ; Tue, 08 Mar 2016 06:41:15 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Mar 8, 2016 at 2:57 PM, Van Haaren, Harry wrote: >> From: David Marchand [mailto:david.marchand@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