From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B3C1424FF for ; Tue, 5 Sep 2023 09:05:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D85540A7F; Tue, 5 Sep 2023 09:05:59 +0200 (CEST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mails.dpdk.org (Postfix) with ESMTP id 7B5904026A; Tue, 5 Sep 2023 09:05:57 +0200 (CEST) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2bcfd3220d3so30987071fa.2; Tue, 05 Sep 2023 00:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693897557; x=1694502357; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=mpNBW+Mvvwa1wwNvYb8RwiO5kSYKvM7/W5+jDDIRfi4=; b=gR9bqU1Y8T/PUVlMH+ZsTA0OdpuYpypBn22ZevQ0qncc/Qmn3G9n0NkRbWQTqkdTFs oTADcS6T1XO5HvB4kn4obhZgJOaSWA9LXo2FaAQ1irnd5xzW0gfnqJbDNEQ6WIQlIRfC 8JMqEFB2J2P837Loamon1lroQUg3YhfShGIohq/NxG1LS7405tJOKZBf17sj8CfG0SQd Crc00m/Km0LDhqjawVOrTa8WiG7WZqIyDVs2WlNhnKlFGkNDE7dFjfUqkx0sL+gprvca nmmOdM37aa00ygnOF5Q1J2bWaPodYwmtD5D3QBTi8tAAkA5x90QcKxDQtk3wXQdRD7le ZolA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693897557; x=1694502357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mpNBW+Mvvwa1wwNvYb8RwiO5kSYKvM7/W5+jDDIRfi4=; b=NFhTJeieZIqJ0rKRAJP6WiFqkY6TgrPatPT4tdF1i9H5PYV/AZLWM+L7bsa9pLlupx H41gTlZs4phCm5ZeBfzF573o75ZcGm6cc53Ak42eXT6H8QVfGFlyQrwZXqDR3fHDxR5H yiS9XIBMcUf7YUtSujGHYOf0M0ggSh4x4i2/I7IUiLNDT8t5rO5MvTRyzApvocMRfkY4 cGp5g5uOKgD3arlG3Y5diNWmSUgmG3qLjLNQRvu+IZSSTvRSKfUylOWI70K9fsJ58liD qlZipn6z/WeQUr53gfQYFvOuI44kb88sVTO1z56zt0W/F3uWH9teoDKcMNlCZ3EJ371z LifQ== X-Gm-Message-State: AOJu0YwFPVriNPkrJVnKa5Dt6TVeBB41ZHXtMGu2ArRVd4YLlR5XAu0Q 8oL9IlQLVy5e+7k2ZiYzqzQ= X-Google-Smtp-Source: AGHT+IFQ/sxllVllk+GEZUiJa3/wtw1OjM6iLaw9mXtxyaUPMHWywdX84Cv2OPLNfjJfiI1sLUJ1vQ== X-Received: by 2002:a2e:920a:0:b0:2bc:f41a:d9bc with SMTP id k10-20020a2e920a000000b002bcf41ad9bcmr8235388ljg.25.1693897556426; Tue, 05 Sep 2023 00:05:56 -0700 (PDT) Received: from sovereign (broadband-109-173-110-33.ip.moscow.rt.ru. [109.173.110.33]) by smtp.gmail.com with ESMTPSA id n5-20020a2e7205000000b002bce77e4ddfsm2675256ljc.97.2023.09.05.00.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 00:05:54 -0700 (PDT) Date: Tue, 5 Sep 2023 10:05:53 +0300 From: Dmitry Kozlyuk To: Artemy Kovalyov Cc: , Thomas Monjalon , Ophir Munk , , Anatoly Burakov , Morten =?UTF-8?B?QnLDuHJ1cA==?= , "Stephen Hemminger" Subject: Re: [PATCH v2] eal: fix memory initialization deadlock Message-ID: <20230905100553.0b6518ca@sovereign> In-Reply-To: <20230904082455.3864024-1-artemyko@nvidia.com> References: <20230830103303.2428995-1-artemyko@nvidia.com> <20230904082455.3864024-1-artemyko@nvidia.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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