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 12871425DC; Mon, 18 Sep 2023 18:33:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BA8B40A84; Mon, 18 Sep 2023 18:32:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 4561440A84 for ; Mon, 18 Sep 2023 18:32:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695054734; x=1726590734; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=74uBObMHMsNpnrj/qqq+exBsqSAPdnL1+30tlMjk4gU=; b=cCmerL/sX9kGyx/TpqGrvjI7649fMF3eMmR/EeT4iXKXi8F1ZkE4JFfb enwEYrfxy1L2/ZgMER2KSRgDStFbVkaap0Y57X7sucu87s2ckMAdOn3LU REeDdp+TjOgOdfgvNh4TYnQulsVmgdrg9UHpD43CpyYQS9pT2EHCr4Z0G jtnOhKDt+ocpm7j5nswGxtmg3G5fsXN/YxhW48h+WxAopD2xcihf8JJuF 55Dt6E5//IyJ/sEOMrv8NE5egPvexsh12B+b0YaEwbHXR6jxUBc97Q1qw 8M00UKtL5uiDtjdIkKhWMX5h2ZcKfA+y0izb0AnyvZWG4arzTUlttvsbB g==; X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="443784567" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="443784567" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 09:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="775189356" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="775189356" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga008.jf.intel.com with ESMTP; 18 Sep 2023 09:32:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v3 0/2] Enable apps to use external memory as native Date: Mon, 18 Sep 2023 17:32:04 +0100 Message-Id: <20230918163206.1010611-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230915122703.475834-1-bruce.richardson@intel.com> References: <20230915122703.475834-1-bruce.richardson@intel.com> 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 Sometimes apps (or perhaps DPDK driver components) may want to allow use of "external" i.e. non EAL allocated, memory as though it were standard DPDK memory. This patchset provides the ability to do this, by: firstly, adding an explicit flag to indicate non-EAL memory, rather than relying on the socket_id implicitly, and then secondly, allowing heaps to be swapped, so an external heap can be used as the default heap for socket 0 or 1, etc. V3: * Expand to 2 patch set, adding patch to tag external memory explicitly, before adding the swap function * Add locks to improve thread safety of the swap opperation. * Add additional notes to function to clarify usage. V2: * Fix doxygen comment issue on doc builds Bruce Richardson (2): eal: add flag to indicate non-EAL malloc heaps eal: allow swapping of malloc heaps lib/eal/common/malloc_heap.c | 46 ++++++++++++++++++++++++++++-------- lib/eal/common/malloc_heap.h | 1 + lib/eal/common/malloc_mp.c | 5 ++-- lib/eal/common/rte_malloc.c | 14 ++++++----- lib/eal/include/rte_malloc.h | 34 ++++++++++++++++++++++++++ lib/eal/version.map | 2 ++ 6 files changed, 83 insertions(+), 19 deletions(-) -- 2.39.2