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 6DD2045CB7; Fri, 8 Nov 2024 23:03:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01AC44067C; Fri, 8 Nov 2024 23:03:02 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id A85CB40263 for ; Fri, 8 Nov 2024 23:03:00 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 592CA1D8E7 for ; Fri, 8 Nov 2024 23:03:00 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 49B7A1DA18; Fri, 8 Nov 2024 23:03:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.2 Received: from [192.168.1.85] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id B65591D936; Fri, 8 Nov 2024 23:02:56 +0100 (CET) Message-ID: <04a51a5f-4a9a-4200-9c3b-9e1c8b4d345c@lysator.liu.se> Date: Fri, 8 Nov 2024 23:02:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] config: limit lcore variable maximum size to 4k To: David Marchand , dev@dpdk.org Cc: thomas@monjalon.net, Bruce Richardson , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Stephen Hemminger , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Chengwen Feng , Konstantin Ananyev References: <20241108181732.173263-1-david.marchand@redhat.com> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <20241108181732.173263-1-david.marchand@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP 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 2024-11-08 19:17, David Marchand wrote: > OVS locks all pages to avoid page faults while processing packets. > 1M for each lcore translates to allocating 128M with default build > options on x86. > This resulted in OOM while running unit tests in parallel. > Could you give some more context. If you get OOM if you add 128 MB of RSS, how much memory have you budgeted for the app in total? What are the packet mempool sizes, for example? If you are running tests in parallel it likely means these aren't characteristics tests, and thus you can disable the mlockall() call and fit many more copies under the OOM ceiling. Another alternative might be to unlock the lcore variables area, or make the whole BSS MLOCK_ONFAULT. > At the moment, the more demanding DPDK user of lcore variable is > rte_service, with a 2112 bytes object. > is a public API, so the largest object may well be much larger than that. That said, maybe 1 MB is too large. > Limit the lcore variable maximum size to 4k which looks more reasonable. > NAK 128 kB? > Fixes: 5bce9bed67ad ("eal: add static per-lcore memory allocation facility") > I've mentioned this property of lcore variables a couple of times on the list, so it should come as no surprise to anyone. > Signed-off-by: David Marchand > --- > config/rte_config.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/config/rte_config.h b/config/rte_config.h > index 498d509244..5f0627679f 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -41,7 +41,7 @@ > /* EAL defines */ > #define RTE_CACHE_GUARD_LINES 1 > #define RTE_MAX_HEAPS 32 > -#define RTE_MAX_LCORE_VAR 1048576 > +#define RTE_MAX_LCORE_VAR 4096 > #define RTE_MAX_MEMSEG_LISTS 128 > #define RTE_MAX_MEMSEG_PER_LIST 8192 > #define RTE_MAX_MEM_MB_PER_LIST 32768