From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7399F2C3F for ; Fri, 31 Mar 2017 01:02:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490914924; x=1522450924; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=E1+P/Tt1Xl7u2EYieS9gGkPso//9tiE1KQ4RAnDoHw8=; b=KDFlWS3eVYeLFlR0B0A9T4zeg1zpQrCpxA1fLIFjlO2oTCwZaEyfYQhG EjgF3rLjNO8dE8nIJrg+3QWulYKv+A==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2017 16:02:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,249,1486454400"; d="scan'208";a="242235502" Received: from txasoft-yocto.an.intel.com (HELO txasoft-yocto.an.intel.com.) ([10.123.72.111]) by fmsmga004.fm.intel.com with ESMTP; 30 Mar 2017 16:02:02 -0700 From: Gage Eads To: dev@dpdk.org Cc: olivier.matz@6wind.com Date: Thu, 30 Mar 2017 18:02:00 -0500 Message-Id: <1490914920-26347-1-git-send-email-gage.eads@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490278858-27257-1-git-send-email-gage.eads@intel.com> References: <1490278858-27257-1-git-send-email-gage.eads@intel.com> Subject: [dpdk-dev] [PATCH v4] mempool: update non-EAL thread note in the header 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: , X-List-Received-Date: Thu, 30 Mar 2017 23:02:05 -0000 Commit 30e6399892276 ("mempool: support non-EAL thread") added the capability for non-EAL threads to use the mempool library. This commit removes the note indicating that the mempool library cannot be used safely by non-EAL threads, and replaces it with a more up-to-date note. Signed-off-by: Gage Eads --- v2: Changed commit message to referenced commit 30e63998 instead of 4b5062755 v3: Fix checkpatch error v4: Rework note to highlight non-EAL thread differences lib/librte_mempool/rte_mempool.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 991feaa..931faf3 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -51,13 +51,15 @@ * meta-data in the object data and retrieve them when allocating a * new object. * - * Note: the mempool implementation is not preemptable. A lcore must - * not be interrupted by another task that uses the same mempool - * (because it uses a ring which is not preemptable). Also, mempool - * functions must not be used outside the DPDK environment: for - * example, in linuxapp environment, a thread that is not created by - * the EAL must not use mempools. This is due to the per-lcore cache - * that won't work as rte_lcore_id() will not return a correct value. + * Note: the mempool implementation is not preemptible. An lcore must not be + * interrupted by another task that uses the same mempool (because it uses a + * ring which is not preemptible). Also, usual mempool functions like + * rte_mempool_get() or rte_mempool_put() are designed to be called from an EAL + * thread due to the internal per-lcore cache. Due to the lack of caching, + * rte_mempool_get() or rte_mempool_put() performance will suffer when called + * by non-EAL threads. Instead, non-EAL threads should call + * rte_mempool_generic_get() or rte_mempool_generic_put() with a user cache + * created with rte_mempool_cache_create(). */ #include -- 2.7.4