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 75D1745D07; Thu, 14 Nov 2024 18:10:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EB8B427CB; Thu, 14 Nov 2024 18:10:24 +0100 (CET) Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by mails.dpdk.org (Postfix) with ESMTP id 14C7D4021F for ; Thu, 14 Nov 2024 18:10:22 +0100 (CET) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7CFB711401BE; Thu, 14 Nov 2024 12:10:21 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 14 Nov 2024 12:10:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1731604221; x=1731690621; bh=g42cjrTyHbPQ107G7+6H6 MmsTAjvQ7Xbb2sXL1x7gj4=; b=RjAi2zSr5jFSfu9Zm4ESpD8WQe5v4zONOPSJ6 8j3u7ou/EEohJGUnkgzQ73A5dxLtt3LZICOcu+6Qy/mr572WYC07h7MPpcxW4hx1 GnM9xUAA8HDQtOnH7JusWzIxLxnVnhQZwj7YYSVOYCVf+WsiXRj+NssNjjxv9Ri8 SfVaEh4nk/Noq2fMDMq/gkGSAX2T5QYM/zAh5G6OCdWB9VApcMKtUtjefZxieOwh KwzD8rRvW8E1HMxZ3DyWYtGyPk28U1rKPhG4/RRkD09/ZYiH8BQcxK7SJZZb+kQR 8bGofoNJ0iRqLaMgBzaZEUb8c1aKNzEFVaIxw/h20XgvQ7Aew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731604221; x=1731690621; bh=g42cjrTyHbPQ107G7+6H6MmsTAjvQ7Xbb2s XL1x7gj4=; b=nH9aEyp0LNi6Rn1Wnoau8L0nhCg50BVuokLbWI8LhZD0QMea60W ON/6aReIVmCYyvbYlsemZlEWTBRbnHi+r2CwopiIIN0alkkFXi7vNUtpQnEyxQZa nAwT0UhPqnWcM/h54CC29Acbn4FiOAAGcYKjfE8J7H4vw3xkTequxiPMFvIWpH0k QQtRnQjIhTZ0YFASLXHur0upxAePAD3nPan/8Fr/0BP5IBYLWyXB4taEaOOiAu+P flflkxJGCgzCAuvXhifDtsidcwo0kvLbtPkReC3zJ0yuRPHq2cxKlWlDd+ixdUFO eaVa/8/d/bNf4Gdzt+KW2/jE43FD5IM5nEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddvgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhr ohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonh drnhgvtheqnecuggftrfgrthhtvghrnhepveevfeevieeihfetudekgeekleeigeffueek veduteeuffeiudevteeiudekfeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgspghr tghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvvhesughpug hkrdhorhhgpdhrtghpthhtohepmhgrthhtihgrshdrrhhonhhnsghlohhmsegvrhhitghs shhonhdrtghomhdprhgtphhtthhopehrohhrvghtiihlrgeslhhinhhugidrmhhitghroh hsohhfthdrtghomhdprhgtphhtthhopehfvghnghgthhgvnhhgfigvnheshhhurgifvghi rdgtohhmpdhrtghpthhtohepkhhonhhsthgrnhhtihhnrdgrnhgrnhihvghvsehhuhgrfi gvihdrtghomhdprhgtphhtthhopehsthgvphhhvghnsehnvghtfihorhhkphhluhhmsggv rhdrohhrghdprhgtphhtthhopehmsgesshhmrghrthhshhgrrhgvshihshhtvghmshdrtg homhdprhgtphhtthhopegurghvihgurdhmrghrtghhrghnugesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Nov 2024 12:10:18 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Tyler Retzlaff , Chengwen Feng , Konstantin Ananyev , Stephen Hemminger , =?UTF-8?q?Morten=20Br=C3=B8rup?= , David Marchand Subject: [PATCH] eal: fix lcore variables documentation Date: Thu, 14 Nov 2024 18:09:47 +0100 Message-ID: <20241114170947.35359-1-thomas@monjalon.net> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The lcore variables API is new in DPDK 24.11, that's why the function rte_lcore_var_alloc() was marked experimental. To be clearer, the whole header file (including all macros) is marked experimental. A change decreased the default buffer size from 1 MB to 128 kB, missing to update the documentation, which is fixed here. Fixes: 5bce9bed67ad ("eal: add static per-lcore memory allocation facility") Fixes: f2fd6c2e080c ("config: limit lcore variable maximum size to 128k") Signed-off-by: Thomas Monjalon --- doc/guides/prog_guide/lcore_var.rst | 2 +- lib/eal/include/rte_lcore_var.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/lcore_var.rst b/doc/guides/prog_guide/lcore_var.rst index b492ad12c6..3d9384bc33 100644 --- a/doc/guides/prog_guide/lcore_var.rst +++ b/doc/guides/prog_guide/lcore_var.rst @@ -240,7 +240,7 @@ and huge pages for lcore variables: and their use would result in a significant amount of memory going to waste. An example: ~256 kB worth of lcore variables are allocated by DPDK libraries, PMDs and the application. - ``RTE_MAX_LCORE_VAR`` is set to 1 MB and ``RTE_MAX_LCORE`` to 128. + ``RTE_MAX_LCORE_VAR`` is set to 128 kB and ``RTE_MAX_LCORE`` to 128. With 4 kB OS pages, only the first ~64 pages of each of the 128 per-lcore id slices in the (only) ``lcore_var_buffer`` will actually be resident (paged in). Here, demand paging saves ~98 MB of memory. diff --git a/lib/eal/include/rte_lcore_var.h b/lib/eal/include/rte_lcore_var.h index 28d88cd89b..0216a67cab 100644 --- a/lib/eal/include/rte_lcore_var.h +++ b/lib/eal/include/rte_lcore_var.h @@ -15,6 +15,8 @@ * * Please refer to the lcore variables' programmer's guide * for an overview of this API and its implementation. + * + * EXPERIMENTAL: this API may change, or be removed, without prior notice. */ #include -- 2.47.0