DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4] eal: fix proc type auto detection
Date: Mon, 12 Aug 2019 14:30:40 +0100
Message-ID: <7d5071eb-a526-b095-892a-722a2f956388@intel.com> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA6758CA25F@IRSMSX102.ger.corp.intel.com>

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 <anatoly.burakov@intel.com>
>> Cc: dev <dev@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>;
>> Stephen Hemminger <stephen@networkplumber.org>; dpdk stable <stable@dpdk.org>
>> Subject: Re: [dpdk-dev] [PATCH v4] eal: fix proc type auto detection
>>
>> On Wed, Jul 24, 2019 at 6:08 PM Anatoly Burakov
>> <anatoly.burakov@intel.com> 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 <anatoly.burakov@intel.com>
> 
> 
> 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

  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 13:19 [dpdk-dev] [PATCH] " Anatoly Burakov
2019-07-23 18:38 ` Stephen Hemminger
2019-07-24 10:04 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2019-07-24 16:04   ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2019-07-24 16:07     ` [dpdk-dev] [PATCH v4] " Anatoly Burakov
2019-07-30  8:13       ` Thomas Monjalon
2019-07-30  9:19         ` Burakov, Anatoly
2019-08-12 10:03       ` David Marchand
2019-08-12 10:21         ` Van Haaren, Harry
2019-08-12 13:30           ` Burakov, Anatoly [this message]
2019-08-12 13:31         ` Burakov, Anatoly

Reply instructions:

You may reply publically 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=7d5071eb-a526-b095-892a-722a2f956388@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox