Show a cover letter.

GET /api/covers/44349/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 44349,
    "url": "http://patches.dpdk.org/api/covers/44349/",
    "web_url": "http://patches.dpdk.org/cover/44349/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1536253938-192391-1-git-send-email-honnappa.nagarahalli@arm.com>",
    "date": "2018-09-06T17:12:14",
    "name": "[0/4] Address reader-writer concurrency in rte_hash",
    "submitter": {
        "id": 1045,
        "url": "http://patches.dpdk.org/api/people/1045/",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "mbox": "http://patches.dpdk.org/cover/44349/mbox/",
    "series": [
        {
            "id": 1214,
            "url": "http://patches.dpdk.org/api/series/1214/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1214",
            "date": "2018-09-06T17:12:14",
            "name": "Address reader-writer concurrency in rte_hash",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1214/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/covers/44349/comments/",
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "dev@dpdk.org, honnappa.nagarahalli@dpdk.org, gavin.hu@arm.com,\n\tsteve.capper@arm.com, ola.liljedahl@arm.com, nd@arm.com,\n\tHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Date": "Thu,  6 Sep 2018 12:12:14 -0500",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailer": "git-send-email 2.7.4",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "To": "bruce.richardson@intel.com,\n\tpablo.de.lara.guarch@intel.com",
        "Errors-To": "dev-bounces@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A520D326D;\n\tThu,  6 Sep 2018 19:12:28 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 9C6EE326C\n\tfor <dev@dpdk.org>; Thu,  6 Sep 2018 19:12:27 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8A7397A9;\n\tThu,  6 Sep 2018 10:12:26 -0700 (PDT)",
            "from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com\n\t[10.118.12.164])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t1CA2B3F557; Thu,  6 Sep 2018 10:12:26 -0700 (PDT)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "Precedence": "list",
        "Delivered-To": "patchwork@dpdk.org",
        "Message-Id": "<1536253938-192391-1-git-send-email-honnappa.nagarahalli@arm.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH 0/4] Address reader-writer concurrency in rte_hash",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "Currently, reader-writer concurrency problems in rte_hash are\n    addressed using reader-writer locks. Use of reader-writer locks\n    results in following issues:\n    \n    1) In many of the use cases for the hash table, writer threads\n       are running on control plane. If the writer is preempted while\n       holding the lock, it will block the readers for an extended period\n       resulting in packet drops. This problem seems to apply for platforms\n       with transactional memory support as well because of the algorithm\n       used for rte_rwlock_write_lock_tm:\n    \n       static inline void\n       rte_rwlock_write_lock_tm(rte_rwlock_t *rwl)\n       {\n            if (likely(rte_try_tm(&rwl->cnt)))\n                    return;\n            rte_rwlock_write_lock(rwl);\n       }\n    \n       i.e. there is a posibility of using rte_rwlock_write_lock in\n       failure cases.\n    2) Reader-writer lock based solution does not address the following\n       issue.\n       rte_hash_lookup_xxx APIs return the index of the element in\n       the key store. Application(reader) can use that index to reference\n       other data structures in its scope. Because of this, the\n       index should not be freed till the application completes\n       using the index.\n    3) Since writer blocks all the readers, the hash lookup\n       rate comes down significantly when there is activity on the writer.\n       This happens even for unrelated entries. Performance numbers\n       given below clearly indicate this.\n    \n    Lock-free solution is required to solve these problems. This patch\n    series adds the lock-free capabilities in the following steps:\n    \n    1) Correct the alignment for the key store entry to prep for\n       memory ordering.\n    2) Add memory ordering to prevent race conditions when a new key\n       is added to the table.\n    \n    3) Reader-writer concurrency issue, caused by moving the keys\n       to their alternate locations during key insert, is solved\n       by introducing an atomic global counter indicating a change\n       in table.\n    \n    4) This solution also has to solve the issue of readers using\n       key store element even after the key is deleted from\n       control plane.\n       To solve this issue, the hash_del_key_xxx APIs do not free\n       the key store element. The key store element has to be freed\n       using the newly introduced rte_hash_free_key_with_position API.\n       It needs to be called once all the readers have stopped using\n       the key store element. How this is determined is outside\n       the scope of this patch (RCU is one such mechanism that the\n       application can use).\n    \n    4) Finally, a lock free reader-writer concurrency flag is added\n       to enable this feature at run time.\n    \n    Performance numbers:\n    Scenario: Equal number of writer/reader threads for concurrent\n\t      writers and readers. For readers only test, the\n              entries are added upfront.\n\n    Current code:\n\tCores\tLookup     Lookup\n\t\twith add\n\t2\t474\t   246\n\t4\t935        579\n\t6\t1387       1048\n\t8\t1766       1480\n\t10\t2119       1951\n\t12\t2546       2441\n\n    With this patch:\n\tCores\tLookup     Lookup\n\t\twith add\n\t2\t291\t   211\n\t4\t297\t   196\n\t6\t304\t   198\n\t8\t309\t   202\n\t10\t315\t   205\n\t12\t319\t   209\n\nHonnappa Nagarahalli (4):\n  hash: correct key store element alignment\n  hash: add memory ordering to avoid race conditions\n  hash: fix rw concurrency while moving keys\n  hash: enable lock-free reader-writer concurrency\n\n lib/librte_hash/rte_cuckoo_hash.c    | 445 +++++++++++++++++++++++++----------\n lib/librte_hash/rte_cuckoo_hash.h    |   6 +-\n lib/librte_hash/rte_hash.h           |  63 ++++-\n lib/librte_hash/rte_hash_version.map |   7 +\n 4 files changed, 393 insertions(+), 128 deletions(-)"
}