From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Artemy Kovalyov <artemyko@nvidia.com>
Cc: dev@dpdk.org, "Thomas Monjalon" <thomas@monjalon.net>,
"Ophir Munk" <ophirmu@nvidia.com>,
stable@dpdk.org, "Anatoly Burakov" <anatoly.burakov@intel.com>,
"Morten Brørup" <mb@smartsharesystems.com>,
"Stephen Hemminger" <stephen@networkplumber.org>
Subject: Re: [PATCH v2] eal: fix memory initialization deadlock
Date: Tue, 5 Sep 2023 10:05:53 +0300 [thread overview]
Message-ID: <20230905100553.0b6518ca@sovereign> (raw)
In-Reply-To: <20230904082455.3864024-1-artemyko@nvidia.com>
2023-09-04 11:24 (UTC+0300), Artemy Kovalyov:
> diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
> index bdbbe233a0..0d5da40096 100644
> --- a/lib/eal/common/eal_common_dynmem.c
> +++ b/lib/eal/common/eal_common_dynmem.c
> @@ -251,7 +251,10 @@ eal_dynmem_hugepage_init(void)
> */
> memset(&dummy, 0, sizeof(dummy));
> dummy.hugepage_sz = hpi->hugepage_sz;
> - if (rte_memseg_list_walk(hugepage_count_walk, &dummy) < 0)
> + /* memory_hotplug_lock is taken in rte_eal_init(), so it's
> + * safe to call thread-unsafe version.
> + */
Nit: the lock is really taken in rte_eal_memory_init().
Probably "The lock is held during initialization, so..."
would more robust against code changes and differences between platforms.
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
next prev parent reply other threads:[~2023-09-05 7:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 10:33 [PATCH] " Artemy Kovalyov
2023-08-30 19:13 ` Dmitry Kozlyuk
2023-09-04 8:24 ` [PATCH v2] " Artemy Kovalyov
2023-09-05 7:05 ` Dmitry Kozlyuk [this message]
2023-09-05 9:05 ` Artemy Kovalyov
2023-09-05 10:15 ` David Marchand
2023-09-06 9:52 ` [PATCH v3] " Artemy Kovalyov
2023-09-06 12:52 ` David Marchand
2023-09-08 13:17 ` [PATCH v4 0/2] " Artemy Kovalyov
2023-09-08 13:17 ` [PATCH v4 1/2] eal: " Artemy Kovalyov
2023-09-08 13:17 ` [PATCH v4 2/2] eal: annotate rte_memseg_list_walk() Artemy Kovalyov
2023-10-06 10:12 ` David Marchand
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=20230905100553.0b6518ca@sovereign \
--to=dmitry.kozliuk@gmail.com \
--cc=anatoly.burakov@intel.com \
--cc=artemyko@nvidia.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=ophirmu@nvidia.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).