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 481E645EBC; Mon, 16 Dec 2024 10:49:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF28B40261; Mon, 16 Dec 2024 10:49:35 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id BFE544025A for ; Mon, 16 Dec 2024 10:49:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734342574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jZz6b/r+JlQFTa+uNMkFYAqiHe8NlSdv6L5Af/tAW6M=; b=DK9QcUUEaMIX2ohUHde+6Z/o3jAgEWJMqGpo3OVIvNAwUHVYHoA29mrdwzieScV+4Yu0SO H8pD02DaHJmh2YDOL0DADWyo4YRqU2rzsatLbd6/bhtUhxUFeg+qJuPZXt2Hqvhfzk0DD0 MABb+kiJY90UZjPKDRwOC7lVVG2SYPM= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-Mm9hHt4DP4uZYW9cA0zuOA-1; Mon, 16 Dec 2024 04:49:32 -0500 X-MC-Unique: Mm9hHt4DP4uZYW9cA0zuOA-1 X-Mimecast-MFC-AGG-ID: Mm9hHt4DP4uZYW9cA0zuOA Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5412ea6eeabso180962e87.2 for ; Mon, 16 Dec 2024 01:49:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734342570; x=1734947370; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jZz6b/r+JlQFTa+uNMkFYAqiHe8NlSdv6L5Af/tAW6M=; b=vJAK2SdjnEbU2dXBkkNY8ipuB0/22RKq5Fqg+alzD8vC41gN0BMjkchapA74XHara9 5Jq28OZ12baCFtUeteBtZXD5xz1kQCagE6U0j5JhEFVP5InvcD2ismZ0yditD6EU2MsY 85Zan+lMQHbc84ce/oQ4+tbLCTettuweRnZHLjfnwU0jAayy9YJRYZKbkM5eZmOvmaW+ Agx58X4T1prgX+mhOOR7/Ft+TasqRheTCfBKmhMi+ByNfBQOoz7Q9yoEXhz16czJVr3F 8dpplWEPgiSCZXPEyF5+OSRZoSApN3EMAKJzAmGPFkwhd/2tEQE+uZMy/VJxi9iAhV2k xFdA== X-Gm-Message-State: AOJu0YwF1UeGazjX8EQfmzEO4wML3Hi3ujDiolgyox/TaBWib8fuudyr WNtBSg+LVRFN8x6bqQQ5R/nSaH69mdelFx8wlNP79urvl/94WIrMQXPPocDN5G5FNDE2/zOw3TK t2Hf6JLEuPDd1uixu4e19OreECq2A8YQBIPoDk6j5/1n5ciWS5HYprbx9ArijFhSUjEj5bXq+S8 DfZ6rhsAebGyMGNQg= X-Gm-Gg: ASbGncv6Rz+FVBSQBnibU/qNGqEZVMTHP09+2nggEnMfjI4I7N6EAVQjSSWUuUuAshU aG1V2WZ7zb4nglm4+ebRdr1BthkiyNvVZLU0xsswC X-Received: by 2002:a05:6512:2392:b0:540:20eb:80c5 with SMTP id 2adb3069b0e04-540905a6f84mr3962651e87.37.1734342570626; Mon, 16 Dec 2024 01:49:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnXssEOBpp1r+6H2qqjzuZ3J+yZjNLCEl+Ggj6sFYKa0diTyq4eSMuFtLuKMAKIGV0tN/xp8hJiyuymU5etdg= X-Received: by 2002:a05:6512:2392:b0:540:20eb:80c5 with SMTP id 2adb3069b0e04-540905a6f84mr3962642e87.37.1734342570282; Mon, 16 Dec 2024 01:49:30 -0800 (PST) MIME-Version: 1.0 References: <20241205175754.1673888-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Mon, 16 Dec 2024 10:49:19 +0100 Message-ID: Subject: Re: [PATCH 0/3] Defer lcore variables allocation To: "Burakov, Anatoly" Cc: dev@dpdk.org, thomas@monjalon.net, frode.nordahl@canonical.com, mattias.ronnblom@ericsson.com X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: d9LVnT6jXet7RHe7YBSyYnQf3GbgU360Pv7Y9frXDvA_1734342571 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Dec 16, 2024 at 10:42=E2=80=AFAM Burakov, Anatoly wrote: > > On 12/5/2024 6:57 PM, David Marchand wrote: > > As I had reported in rc2, the lcore variables allocation have a > > noticeable impact on applications consuming DPDK, even when such > > applications does not use DPDK, or use features associated to > > some lcore variables. > > > > While the amount has been reduced in a rush before rc2, > > there are still cases when the increased memory footprint is noticed > > like in scaling tests. > > See https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/2090931 > > > > > > lcore variable allocations in constructor is a bad idea, as the > > application consuming DPDK has no control over such allocation: > > linking some code does not mean that all of it will be used at runtime. > > > > The general question on whether lcore variables in constructor should > > be forbidden, is left to a later discussion. > > > > For now, this series only focus on fixing subsystems using lcore > > variables so that those allocations are deferred either in rte_eal_init= () > > or in the path that does require such lcore variables. > > > > > > An idle question: would this have any consequences in use case of eal > init -> eal cleanup -> eal init with different arguments? Hum, interesting question. I would say that initialising lcore variables in constructors means that this usecase is broken, since lcore variables are freed in eal_lcore_var_cleanup(). --=20 David Marchand