From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E070BA0471 for ; Mon, 12 Aug 2019 15:31:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DEDC3326D; Mon, 12 Aug 2019 15:31:13 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C3E481252; Mon, 12 Aug 2019 15:31:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 06:30:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="259791777" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.78]) ([10.237.220.78]) by orsmga001.jf.intel.com with ESMTP; 12 Aug 2019 06:30:40 -0700 To: "Van Haaren, Harry" , David Marchand Cc: dev , "Richardson, Bruce" , Stephen Hemminger , dpdk stable References: <67a795e77bc9f5ac79ab78a878ae19abbead9f50.1563984454.git.anatoly.burakov@intel.com> From: "Burakov, Anatoly" Message-ID: <7d5071eb-a526-b095-892a-722a2f956388@intel.com> Date: Mon, 12 Aug 2019 14:30:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] eal: fix proc type auto detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12-Aug-19 11:21 AM, Van Haaren, Harry wrote: >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand >> Sent: Monday, August 12, 2019 11:04 AM >> To: Burakov, Anatoly >> Cc: dev ; Richardson, Bruce ; >> Stephen Hemminger ; dpdk stable >> Subject: Re: [dpdk-dev] [PATCH v4] eal: fix proc type auto detection >> >> On Wed, Jul 24, 2019 at 6:08 PM Anatoly Burakov >> 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@dpdk.org >>> >>> Signed-off-by: Anatoly Burakov > > > 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