Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/32453/?format=api
https://patches.dpdk.org/api/patches/32453/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/384ff9cb344a35f47f30506070592076ea2cb48e.1513681966.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "https://patches.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": "<384ff9cb344a35f47f30506070592076ea2cb48e.1513681966.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/384ff9cb344a35f47f30506070592076ea2cb48e.1513681966.git.anatoly.burakov@intel.com", "date": "2017-12-19T11:14:32", "name": "[dpdk-dev,RFC,v2,05/23] eal: protect malloc heap stats with a lock", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "443331dce91a5f3aac6ea534abdf61a1ccefa774", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/384ff9cb344a35f47f30506070592076ea2cb48e.1513681966.git.anatoly.burakov@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/32453/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/32453/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 93EF91B03F;\n\tTue, 19 Dec 2017 12:15:04 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 50D831B01C\n\tfor <dev@dpdk.org>; Tue, 19 Dec 2017 12:14:55 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Dec 2017 03:14:54 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 19 Dec 2017 03:14:52 -0800", "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tvBJBEprR003098; Tue, 19 Dec 2017 11:14:51 GMT", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id vBJBEprO010208;\n\tTue, 19 Dec 2017 11:14:51 GMT", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id vBJBEpcj010204;\n\tTue, 19 Dec 2017 11:14:51 GMT" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.45,426,1508828400\"; d=\"scan'208\";a=\"14827537\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "andras.kovacs@ericsson.com, laszlo.vadkeri@ericsson.com,\n\tkeith.wiles@intel.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net", "Date": "Tue, 19 Dec 2017 11:14:32 +0000", "Message-Id": "<384ff9cb344a35f47f30506070592076ea2cb48e.1513681966.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1513681966.git.anatoly.burakov@intel.com>", "<cover.1513681966.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1513681966.git.anatoly.burakov@intel.com>", "<cover.1513681966.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [RFC v2 05/23] eal: protect malloc heap stats with a lock", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This does not change the public API, as this API is not meant to be\ncalled directly.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/malloc_heap.c | 7 ++++++-\n lib/librte_eal/common/malloc_heap.h | 2 +-\n 2 files changed, 7 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c\nindex 099e448..b3a1043 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -214,12 +214,14 @@ malloc_heap_resize(struct malloc_elem *elem, size_t size) {\n * Function to retrieve data for heap on given socket\n */\n int\n-malloc_heap_get_stats(const struct malloc_heap *heap,\n+malloc_heap_get_stats(struct malloc_heap *heap,\n \t\tstruct rte_malloc_socket_stats *socket_stats)\n {\n \tsize_t idx;\n \tstruct malloc_elem *elem;\n \n+\trte_spinlock_lock(&(heap->lock));\n+\n \t/* Initialise variables for heap */\n \tsocket_stats->free_count = 0;\n \tsocket_stats->heap_freesz_bytes = 0;\n@@ -241,6 +243,9 @@ malloc_heap_get_stats(const struct malloc_heap *heap,\n \tsocket_stats->heap_allocsz_bytes = (socket_stats->heap_totalsz_bytes -\n \t\t\tsocket_stats->heap_freesz_bytes);\n \tsocket_stats->alloc_count = heap->alloc_count;\n+\n+\trte_spinlock_unlock(&(heap->lock));\n+\n \treturn 0;\n }\n \ndiff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h\nindex 3767ef3..df04dd8 100644\n--- a/lib/librte_eal/common/malloc_heap.h\n+++ b/lib/librte_eal/common/malloc_heap.h\n@@ -63,7 +63,7 @@ int\n malloc_heap_resize(struct malloc_elem *elem, size_t size);\n \n int\n-malloc_heap_get_stats(const struct malloc_heap *heap,\n+malloc_heap_get_stats(struct malloc_heap *heap,\n \t\tstruct rte_malloc_socket_stats *socket_stats);\n \n int\n", "prefixes": [ "dpdk-dev", "RFC", "v2", "05/23" ] }{ "id": 32453, "url": "