From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Qiu, Michael" Subject: Re: [PATCH] eal: add function to check if primary proc alive Date: Thu, 21 Jan 2016 06:14:00 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028622F1E7EA@SHSMSX101.ccr.corp.intel.com> References: <1453296322-1210-1-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: "Van Haaren, Harry" , "david.marchand@6wind.com" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AEF8B8E87 for ; Thu, 21 Jan 2016 07:15:40 +0100 (CET) Content-Language: en-US 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 1/20/2016 9:26 PM, Harry van Haaren wrote:=0A= > This patch adds a new function to the EAL API:=0A= > int rte_eal_primary_proc_alive(const char *path);=0A= >=0A= > The function indicates if a primary process is alive right now.=0A= > This functionality is implemented by testing for a write-=0A= > lock on the config file, and the function tests for a lock.=0A= >=0A= > The use case for this functionality is that a secondary=0A= > process can wait until a primary process starts by polling=0A= > the function and waiting. When the primary is running, the=0A= > secondary continues to poll to detect if the primary process=0A= > has quit unexpectedly, the secondary process can detect this.=0A= >=0A= > The RTE_MAGIC number is written to the shared config by the=0A= > primary process, this is the signal to the secondary process=0A= > that the EAL is set up, and ready to be used. The function=0A= > rte_eal_mcfg_complete() writes RTE_MAGIC. This has been=0A= > delayed in the EAL init proceedure, as the PCI probing in=0A= > the primary process can interfere with the secondary running.=0A= >=0A= > Signed-off-by: Harry van Haaren =0A= > ---=0A= =0A= one question:=0A= =0A= As we could start up many primaries, how does your secondary process=0A= work with them?=0A= =0A= Thanks,=0A= Michael=0A= =0A=