Cover Detail
Show a cover letter.
GET /api/covers/62476/?format=api
http://patchwork.dpdk.org/api/covers/62476/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/cover/20191105153707.14645-1-olivier.matz@6wind.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20191105153707.14645-1-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20191105153707.14645-1-olivier.matz@6wind.com", "date": "2019-11-05T15:36:59", "name": "[v4,0/7] mempool: avoid objects allocations across pages", "submitter": { "id": 8, "url": "http://patchwork.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/cover/20191105153707.14645-1-olivier.matz@6wind.com/mbox/", "series": [ { "id": 7258, "url": "http://patchwork.dpdk.org/api/series/7258/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=7258", "date": "2019-11-05T15:36:59", "name": "mempool: avoid objects allocations across pages", "version": 4, "mbox": "http://patchwork.dpdk.org/series/7258/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/covers/62476/comments/", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 987ECA04A2;\n\tTue, 5 Nov 2019 16:37:21 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C24001BF9F;\n\tTue, 5 Nov 2019 16:37:20 +0100 (CET)", "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 4D0851BF6B\n for <dev@dpdk.org>; Tue, 5 Nov 2019 16:37:19 +0100 (CET)", "from glumotte.dev.6wind.com. (unknown [10.16.0.195])\n by proxy.6wind.com (Postfix) with ESMTP id 1A24B33B0ED;\n Tue, 5 Nov 2019 16:37:19 +0100 (CET)" ], "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org", "Cc": "Anatoly Burakov <anatoly.burakov@intel.com>,\n Andrew Rybchenko <arybchenko@solarflare.com>,\n Ferruh Yigit <ferruh.yigit@linux.intel.com>,\n \"Giridharan, Ganesan\" <ggiridharan@rbbn.com>,\n Jerin Jacob Kollanukkaran <jerinj@marvell.com>,\n \"Kiran Kumar Kokkilagadda\" <kirankumark@marvell.com>,\n Stephen Hemminger <sthemmin@microsoft.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Vamsi Krishna Attunuru <vattunuru@marvell.com>,\n Hemant Agrawal <hemant.agrawal@nxp.com>, Nipun Gupta <nipun.gupta@nxp.com>,\n David Marchand <david.marchand@redhat.com>", "Date": "Tue, 5 Nov 2019 16:36:59 +0100", "Message-Id": "<20191105153707.14645-1-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190719133845.32432-1-olivier.matz@6wind.com>", "References": "<20190719133845.32432-1-olivier.matz@6wind.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v4 0/7] mempool: avoid objects allocations across\n\tpages", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "KNI supposes that mbufs are contiguous in kernel virtual memory. This\nmay not be true when using the IOVA=VA mode. To fix this, a possibility\nis to ensure that objects do not cross page boundaries in mempool. This\npatchset implements this in the last patch (5/5).\n\nThe previous patches prepare the job:\n- allow to populate with an unaligned virtual area (1/5).\n- reduce spaced wasted in the mempool size calculation when not using\n the iova-contiguous allocation (2/5).\n- remove the iova-contiguous allocation when populating mempool (3/5):\n a va-contiguous alloc does the job as well if we want to populate\n without crossing page boundaries, so simplify the mempool populate\n function.\n- export a function to get the minimum page used in a mempool (4/5)\n\nMemory consumption impact when using hugepages:\n- worst case: + ~0.1% for a mbuf pool (objsize ~= 2368)\n- best case: -50% for if pool size is just above page size\n\nThe memory consumption impact with 4K pages in IOVA=VA mode could\nhowever consume up to 75% more memory for mbuf pool, because there will\nbe only 1 mbuf per page. Not sure how common this usecase is.\n\nCaveat: this changes the behavior of the mempool (calc_mem_size and\npopulate), and there is a small risk to break things, especially with\nalternate mempool drivers.\n\nv4\n\n* remove useless comments in Makefiles and meson.build (sugg by David)\n* add EXPERIMENTAL banner on new functions in API comments (David)\n* sort by version in rte_mempool_version.map (David)\n* remove duplicated -DALLOW_EXPERIMENTAL_API flag in octeontx2\n mempool driver\n* enhance API comments for new helpers\n\nv3\n\n* introduce new helpers to calculate required memory size and to\n populate mempool, use them in drivers: the alignment constraint\n of octeontx/octeontx2 is managed in this common code.\n* fix octeontx mempool driver by taking alignment constraint in account\n like in octeontx2\n* fix bucket mempool driver with 4K pages: limit bucket size in this\n case to ensure that objects do not cross page boundaries. With larger\n pages, it was already ok, because bucket size (64K) is smaller than\n a page.\n* fix some api comments in mempool header file\n\nv2\n\n* update octeontx2 driver to keep alignment constraint (issue seen by\n Vamsi)\n* add a new patch to use RTE_MEMPOOL_ALIGN (Andrew)\n* fix initialization of for loop in rte_mempool_populate_virt() (Andrew)\n* use rte_mempool_populate_iova() if mz_flags has\n RTE_MEMZONE_IOVA_CONTIG (Andrew)\n* check rte_mempool_get_page_size() return value (Andrew)\n* some other minor style improvements\n\nrfc -> v1\n\n* remove first cleanup patch, it was pushed separately\n a2b5a8722f20 (\"mempool: clarify default populate function\")\n* add missing change in rte_mempool_op_calc_mem_size_default()\n* allow unaligned addr/len in populate virt\n* better split patches\n* try to better explain the change\n* use DPDK align macros when relevant\n\nOlivier Matz (7):\n mempool: allow unaligned addr/len in populate virt\n mempool: reduce wasted space on mempool populate\n mempool: remove optimistic IOVA-contiguous allocation\n mempool: introduce function to get mempool page size\n mempool: introduce helpers for populate and calc mem size\n mempool: prevent objects from being across pages\n mempool: use the specific macro for object alignment\n\n drivers/mempool/bucket/Makefile | 1 +\n drivers/mempool/bucket/meson.build | 2 +\n drivers/mempool/bucket/rte_mempool_bucket.c | 10 +-\n drivers/mempool/dpaa/dpaa_mempool.c | 4 +-\n drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 4 +-\n drivers/mempool/octeontx/Makefile | 2 +\n drivers/mempool/octeontx/meson.build | 2 +\n .../mempool/octeontx/rte_mempool_octeontx.c | 21 +--\n drivers/mempool/octeontx2/Makefile | 2 +\n drivers/mempool/octeontx2/meson.build | 2 +\n drivers/mempool/octeontx2/otx2_mempool_ops.c | 21 ++-\n lib/librte_mempool/rte_mempool.c | 147 +++++++-----------\n lib/librte_mempool/rte_mempool.h | 114 ++++++++++++--\n lib/librte_mempool/rte_mempool_ops.c | 4 +-\n lib/librte_mempool/rte_mempool_ops_default.c | 113 +++++++++++---\n lib/librte_mempool/rte_mempool_version.map | 6 +\n 16 files changed, 312 insertions(+), 143 deletions(-)" }{ "id": 62476, "url": "