All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: David Marchand <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v6] eal: add function to check if primary proc alive
Date: Tue, 8 Mar 2016 09:58:34 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA6128897AE@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <CALwxeUu1AdmqzcFuoMpB6Ba2s98Citpj2cjrGiioJ=rY2QG35g@mail.gmail.com>

Hi David,

> From: David Marchand [mailto:david.marchand@6wind.com]
> Subject: Re: [PATCH v6] eal: add function to check if primary proc alive

> When I look at this new api, I am under the impression that you are
> supposed to check for primary liveliness once dpdk init has finished
> (from your secondary process point of view), not before and not while
> it is initialising.

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.

So we *must* detect a primary process being ready to attach to, *without*
having called  rte_eal_init()  in the secondary process.


> Why do you need to move this ?

Issues arise when a primary and secondary process both scan the PCI devices
at the same time. Moving  rte_eal_mcfg_complete()  solves this race-cond
because the secondary process will wait until the primary is finished.


> > +       if (config_file_path)
> > +               config_fd = open(config_file_path, O_RDONLY);
> > +       else {
> > +               char default_path[PATH_MAX+1];
> > +               snprintf(default_path, PATH_MAX, RUNTIME_CONFIG_FMT,
> > +                        default_config_dir, "rte");
> > +               config_fd = open(default_path, O_RDONLY);
> 
> Can't you reuse eal_runtime_config_path() here ?

No, as rte_eal_init() has not been called, for the same reason as above.
As rte_eal_init() has not been called, the shared config that is read by
eal_runtime_config_path() has not been initialized.


-Harry

  reply	other threads:[~2016-03-08  9:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 13:25 [PATCH] eal: add function to check if primary proc alive Harry van Haaren
2016-01-21  6:14 ` Qiu, Michael
2016-01-21  6:19   ` Matthew Hall
2016-01-21  9:02   ` Van Haaren, Harry
2016-01-22 17:37     ` Bruce Richardson
2016-01-25  8:06       ` Qiu, Michael
2016-01-25 11:44       ` Van Haaren, Harry
2016-01-26 19:13         ` Bruce Richardson
2016-01-27 10:35           ` Van Haaren, Harry
2016-01-25  8:11 ` Qiu, Michael
2016-01-25 11:51   ` Van Haaren, Harry
2016-01-26  2:25     ` Qiu, Michael
2016-01-26  9:04       ` Van Haaren, Harry
2016-01-26 11:07         ` Qiu, Michael
2016-01-26 11:19           ` Van Haaren, Harry
2016-01-27 10:31 ` [PATCH v2] " Harry van Haaren
2016-02-02 14:11   ` [PATCH v3] " Harry van Haaren
2016-02-23 14:10     ` [PATCH v4] " Harry van Haaren
2016-02-24 13:50       ` Tahhan, Maryam
2016-03-04 18:07       ` Thomas Monjalon
2016-03-07 11:37       ` [PATCH v5] " Harry van Haaren
2016-03-07 12:02         ` [PATCH v6] " Harry van Haaren
2016-03-08  8:42           ` David Marchand
2016-03-08  9:58             ` Van Haaren, Harry [this message]
2016-03-08 11:13               ` Thomas Monjalon
2016-03-08 11:19                 ` David Marchand
2016-03-08 13:57                   ` Van Haaren, Harry
2016-03-08 14:40                     ` David Marchand
2016-03-08 17:07           ` [PATCH v7 0/2] eal: add function to check primary alive Harry van Haaren
2016-03-08 17:07             ` [PATCH v7 1/2] eal: fix race-condition in pri/sec proc startup Harry van Haaren
2016-03-08 17:07             ` [PATCH v7 2/2] eal: add function to check if primary proc alive Harry van Haaren
2016-03-09 10:12             ` [PATCH v8 0/2] eal: add function to check primary alive Harry van Haaren
2016-03-09 10:12               ` [PATCH v8 1/2] eal: fix race-condition in pri/sec proc startup Harry van Haaren
2016-03-09 13:23                 ` Sergio Gonzalez Monroy
2016-03-09 10:12               ` [PATCH v8 2/2] eal: add function to check if primary proc alive Harry van Haaren
2016-03-09 11:07               ` [PATCH v8 0/2] eal: add function to check primary alive David Marchand
2016-03-09 12:59                 ` Sergio Gonzalez Monroy
2016-03-09 13:37               ` [PATCH v9 " Harry van Haaren
2016-03-09 13:37                 ` [PATCH v9 1/2] eal: fix race-condition in pri/sec proc startup Harry van Haaren
2016-03-09 14:27                   ` Sergio Gonzalez Monroy
2016-03-09 13:37                 ` [PATCH v9 2/2] eal: add function to check if primary proc alive Harry van Haaren
2016-03-09 15:02                   ` Thomas Monjalon
2016-03-09 15:17                 ` [PATCH v9 0/2] eal: add function to check primary alive Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E923DB57A917B54B9182A2E928D00FA6128897AE@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.