From patchwork Fri Feb 22 15:29:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Burakov, Anatoly" X-Patchwork-Id: 50453 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F20DE2BF7; Fri, 22 Feb 2019 16:29:34 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 541AC2BE5; Fri, 22 Feb 2019 16:29:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 07:29:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,400,1544515200"; d="scan'208";a="146463594" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 22 Feb 2019 07:29:29 -0800 Received: from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com [10.243.17.64]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x1MFTT0C021492; Fri, 22 Feb 2019 15:29:29 GMT Received: from sivswdev05.ir.intel.com (localhost [127.0.0.1]) by sivswdev05.ir.intel.com with ESMTP id x1MFTTWx009871; Fri, 22 Feb 2019 15:29:29 GMT Received: (from aburakov@localhost) by sivswdev05.ir.intel.com with LOCAL id x1MFTTgM009678; Fri, 22 Feb 2019 15:29:29 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 22 Feb 2019 15:29:29 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] malloc: fix documentation for realloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The documentation for rte_realloc claims that the resized area will always reside on the same NUMA node. This is not actually the case - while *resized* area will be on the same NUMA node, if resizing the area is not possible, then the memory will be reallocated using rte_malloc(), which can allocate memory on another NUMA node, depending on which lcore rte_realloc() was called from and which NUMA nodes have memory available. Fix the API doc to match the actual code of rte_realloc(). Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/include/rte_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h index 54a12467a..e0be13ca3 100644 --- a/lib/librte_eal/common/include/rte_malloc.h +++ b/lib/librte_eal/common/include/rte_malloc.h @@ -111,7 +111,7 @@ rte_calloc(const char *type, size_t num, size_t size, unsigned align); /** * Replacement function for realloc(), using huge-page memory. Reserved area * memory is resized, preserving contents. In NUMA systems, the new area - * resides on the same NUMA socket as the old area. + * may not reside on the same NUMA node as the old one. * * @param ptr * Pointer to already allocated memory