From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ye6bce+COZVL8HSBdutLYchL+ttyWNdFiDKKZtixSjg=; b=SsupTFxw9XciV452pv0NyvGRzl9BYx3h/gT7GNGSKaWSfZ1fhdA0qAXjyrN/Fj2Gbu wBST/83u85fizbK8nPMKtC+v31iCbr6iFc473XYwhC1Wo5imvLcRQJrVJX62l246yfJP BP6L4/AzqLSn4y22ZHkvuPTzNQcm9/RQWfi/LfEXNOdNIb1jYH68W9L5ic0XMOCNC8R0 VwpaBACkfEwCBMx1QKkFR72kQkU7JhKe01/gp7SFKUAq+IBRY2tQB+WlCI9543q2GbQ6 XNo4C6K5MpZ/1X9exC9dDiShEfDJ4w6hl7L4kzmd+ilXpFtJf98B89TrVTY1jlcrfkWx n2FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ye6bce+COZVL8HSBdutLYchL+ttyWNdFiDKKZtixSjg=; b=cmxEmfvnHuV5CNkNx5zh/U2Dye4ylxPLbJRQw/HM2o//5eug9ap038L02E3WB+zvY4 8A+yqBFHxQWY75/8QN4R2c29xcIuXCgv8gXCe6ELU5urY1IPopnXNAyaNRNj3ICI9YqF qUHrji466aiCTdJ0jbxNBgdgxcsFaz3VpgWzcvTTmbRyugVZbuiMh7gJYhUshY6UeWgG 2Iic/hxmI0vVVqaB0CL+cxds4sUZtmzvr1tkAfNe2S1aw2ToL8rv3dy9YfjlhWXqIhTB G4FVJHQfvL0ZDnmLRXv54k+3JFBIQQHVYKs2AXIK0oQpg+cMOMN9wiPttlxA7Xx3J9aQ 6pHw== X-Gm-Message-State: AD7BkJLtCt4K552sHhDJEFOVHeuDnYDo9ILCN2Mt35eguIi94paKubfwOrpVV1pFpxa2T9cXdQktMD5oEULVnCUp X-Received: by 10.60.82.229 with SMTP id l5mr17283766oey.6.1457448075363; Tue, 08 Mar 2016 06:41:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.180.72 with HTTP; Tue, 8 Mar 2016 06:40:55 -0800 (PST) In-Reply-To: References: <1457350669-32582-1-git-send-email-harry.van.haaren@intel.com> <2251445.Z6GIcehbaX@xps13> From: David Marchand Date: Tue, 8 Mar 2016 15:40:55 +0100 Message-ID: To: "Van Haaren, Harry" Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v6] 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: Tue, 08 Mar 2016 14:41:16 -0000 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