From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id B6D15C614 for ; Thu, 16 Jun 2016 13:02:21 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id v199so187283867wmv.0 for ; Thu, 16 Jun 2016 04:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nofutznetworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=kwg0l5vNH1TV9g/cIZEVSUMdjaJrklWldtTndgXh6gE=; b=ne2xH6hMiEBu8C5VWl1yx42uzHtfX1E4ezMis3fRgfZzup6wgREe104OmNt6eqAINF Cz67APmPo6ZjfbSoQk+GPhsMTlfwIeu37a3d1kntNBG3d/rTRVBSimRIfiwEQRbrYjZa 0r/z4sY3KhgeYFaeOC8cezPbjDF+CZ7bJBM191pR6AkxaXCHC3vFjODLK6tpjs1gYVI9 Lt/YWX73qGFoSP7afCFUg/vnKsPcNgLWNP1X8wpiOZdNO19Wfty5uMt2q8NgU0AcAYun HqWptVN2vAZu35SYxVr6u6Gu1QVe+BuN9jO59wdpiRI0LE8HcMFo9FMWGQ0kK1jjuN8S x24Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kwg0l5vNH1TV9g/cIZEVSUMdjaJrklWldtTndgXh6gE=; b=RPOz/nNU2C3fruEGk26XLUUTyqcvKq4qkpplt0tk/en06nzwi8DUOeTkOOwVfDQ3OK itq5YY8GMyKPJb9t3qFik2RKK7mXJzoD/nUy0lU4ipSRt9ReznpNNloJex9kOCC/A8xS qAXd28iEZb2aUe3iWrqowMmMX/lz0BD0DBcBTJMwKEiscbtn7+ylwZxF8Mclc88PwfC6 6KlmV3thxxyPohD9M3eJwvAehIbwkORU5QbkL7ourYps55rwk/2YEjBgoLsb89W6cxt8 zYwofV3QeUAwmLL+qcD8MLi0gFeVSW7J4WJ4XwcK5S2guhkVJevkdDzIjZuwi5IIIHOd CJRw== X-Gm-Message-State: ALyK8tIEWJiaeobNzsTCESiQOLKAhl+10xZrxpJw2GN24it5M+SBgoct1USiFMWEAm+LtA== X-Received: by 10.28.228.69 with SMTP id b66mr14125037wmh.25.1466074941167; Thu, 16 Jun 2016 04:02:21 -0700 (PDT) Received: from localhost.localdomain (host109-145-5-24.range109-145.btcentralplus.com. [109.145.5.24]) by smtp.gmail.com with ESMTPSA id q71sm14383530wme.17.2016.06.16.04.02.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Jun 2016 04:02:20 -0700 (PDT) From: Lazaros Koromilas To: dev@dpdk.org Cc: Olivier Matz , Konstantin Ananyev , David Hunt Date: Thu, 16 Jun 2016 12:02:16 +0100 Message-Id: <1466074939-29863-1-git-send-email-l@nofutznetworks.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH v3 0/3] mempool: user-owned mempool caches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 11:02:21 -0000 Updated version of the user-owned cache patchset. It applies on top of the latest external mempool manager patches from David Hunt [1]. [1] http://dpdk.org/ml/archives/dev/2016-June/041479.html v3 changes: * Deprecate specific mempool API calls instead of removing them. * Split deprecation into a separate commit to limit noise. * Fix cache flush by setting cache->len = 0 and make it inline. * Remove cache->size == 0 checks and ensure size != 0 at creation. * Fix tests to check if cache creation succeeded. * Fix tests to free allocated resources on error. The mempool cache is only available to EAL threads as a per-lcore resource. Change this so that the user can create and provide their own cache on mempool get and put operations. This works with non-EAL threads too. Also, deprecate the explicit {mp,sp}_put and {mc,sc}_get calls and re-route them through the new generic calls. Minor cleanup to pass the mempool bit flags instead of using specific is_mp and is_mc. The old cache-oblivious API calls use the per-lcore default local cache. The mempool and mempool_perf tests are also updated to handle the user-owned cache case. Introduced API calls: rte_mempool_cache_create(size, socket_id) rte_mempool_cache_free(cache) rte_mempool_cache_flush(cache, mp) rte_mempool_default_cache(mp, lcore_id) rte_mempool_generic_put(mp, obj_table, n, cache, flags) rte_mempool_generic_get(mp, obj_table, n, cache, flags) Deprecated API calls: rte_mempool_mp_put_bulk(mp, obj_table, n) rte_mempool_sp_put_bulk(mp, obj_table, n) rte_mempool_mp_put(mp, obj) rte_mempool_sp_put(mp, obj) rte_mempool_mc_get_bulk(mp, obj_table, n) rte_mempool_sc_get_bulk(mp, obj_table, n) rte_mempool_mc_get(mp, obj_p) rte_mempool_sc_get(mp, obj_p) Lazaros Koromilas (3): mempool: deprecate specific get/put functions mempool: use bit flags instead of is_mp and is_mc mempool: allow for user-owned mempool caches app/test/test_mempool.c | 104 +++++++++++----- app/test/test_mempool_perf.c | 70 +++++++++-- lib/librte_mempool/rte_mempool.c | 66 +++++++++- lib/librte_mempool/rte_mempool.h | 256 +++++++++++++++++++++++++++++---------- 4 files changed, 385 insertions(+), 111 deletions(-) -- 1.9.1