From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2B2B18E6C for ; Mon, 25 Jan 2016 09:11:09 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 25 Jan 2016 00:11:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,343,1449561600"; d="scan'208";a="640938716" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jan 2016 00:11:07 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 25 Jan 2016 00:11:07 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 25 Jan 2016 00:11:07 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by shsmsx102.ccr.corp.intel.com ([169.254.2.172]) with mapi id 14.03.0248.002; Mon, 25 Jan 2016 16:11:05 +0800 From: "Qiu, Michael" To: "Van Haaren, Harry" , "david.marchand@6wind.com" Thread-Topic: [dpdk-dev] [PATCH] eal: add function to check if primary proc alive Thread-Index: AQHRU4YjdEIiCFakoU645h1q4mhKnQ== Date: Mon, 25 Jan 2016 08:11:04 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028622F2180B@SHSMSX101.ccr.corp.intel.com> References: <1453296322-1210-1-git-send-email-harry.van.haaren@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal: add function to check if primary proc alive X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2016 08:11:09 -0000 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= =0A= Hi, Harry=0A= =0A= So secondary will waste a whole lcore to do such polling?=0A= =0A= Thanks,=0A= Michael=0A= =0A= =0A=