From patchwork Thu Nov 1 04:54:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 47637 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 611694F90; Thu, 1 Nov 2018 05:55:23 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 33FDF2C2F for ; Thu, 1 Nov 2018 05:55:20 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6AF70EBD; Wed, 31 Oct 2018 21:55:19 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EDC343F557; Wed, 31 Oct 2018 21:55:18 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Wed, 31 Oct 2018 23:54:52 -0500 Message-Id: <20181101045454.632-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101045454.632-1-honnappa.nagarahalli@arm.com> References: <1539208085-30756-4-git-send-email-yipeng1.wang@intel.com> <20181101045454.632-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 1/3] hash: deprecate lock ellision and read/write concurreny flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hash library should provide read/write concurrency by default as most of the use cases require read/write concurrency. Hence the flag RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY is deprecated. The library will decide if locking is required to provide the concurrency based on other configuration flags. If a lock is used to provide the read/write concurrency, best possible locking mechanism available on the platform should be used. Hence, the flag RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT is deprecated. The library will use transactional memory if the platform supports it. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- lib/librte_hash/rte_cuckoo_hash.c | 319 ++++++++++++++++++++++++++- lib/librte_hash/rte_hash.h | 22 +- lib/librte_hash/rte_hash_version.map | 7 + 3 files changed, 345 insertions(+), 3 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 5ddcccd87..a11de22be 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -121,7 +121,7 @@ get_alt_bucket_index(const struct rte_hash *h, } struct rte_hash * -rte_hash_create(const struct rte_hash_parameters *params) +rte_hash_create_v20(const struct rte_hash_parameters *params) { struct rte_hash *h = NULL; struct rte_tailq_entry *te = NULL; @@ -446,6 +446,323 @@ rte_hash_create(const struct rte_hash_parameters *params) rte_free(tbl_chng_cnt); return NULL; } +VERSION_SYMBOL(rte_hash_create, _v20, 2.0); + +struct rte_hash * +rte_hash_create_v1811(const struct rte_hash_parameters *params) +{ + struct rte_hash *h = NULL; + struct rte_tailq_entry *te = NULL; + struct rte_hash_list *hash_list; + struct rte_ring *r = NULL; + struct rte_ring *r_ext = NULL; + char hash_name[RTE_HASH_NAMESIZE]; + void *k = NULL; + void *buckets = NULL; + void *buckets_ext = NULL; + char ring_name[RTE_RING_NAMESIZE]; + char ext_ring_name[RTE_RING_NAMESIZE]; + unsigned num_key_slots; + unsigned i; + unsigned int use_local_cache = 0; + unsigned int ext_table_support = 0; + unsigned int readwrite_concur_support = 1; + unsigned int writer_takes_lock = 1; + unsigned int no_free_on_del = 0; + uint32_t *tbl_chng_cnt = NULL; + unsigned int readwrite_concur_lf_support = 0; + + rte_hash_function default_hash_func = (rte_hash_function)rte_jhash; + + hash_list = RTE_TAILQ_CAST(rte_hash_tailq.head, rte_hash_list); + + if (params == NULL) { + RTE_LOG(ERR, HASH, "rte_hash_create has no parameters\n"); + return NULL; + } + + /* Check for valid parameters */ + if ((params->entries > RTE_HASH_ENTRIES_MAX) || + (params->entries < RTE_HASH_BUCKET_ENTRIES) || + (params->key_len == 0)) { + rte_errno = EINVAL; + RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n"); + return NULL; + } + + /* Validate correct usage of extra options */ + if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) && + (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE)) { + rte_errno = EINVAL; + RTE_LOG(ERR, HASH, "rte_hash_create: extendable bucket " + "feature not supported with rw concurrency " + "lock free\n"); + return NULL; + } + + /* Check extra flags field to check extra options. */ + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD) + use_local_cache = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE) + ext_table_support = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL) + no_free_on_del = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) { + /* Do not use lock for RW concurrency */ + readwrite_concur_support = 0; + readwrite_concur_lf_support = 1; + /* Enable not freeing internal memory/index on delete */ + no_free_on_del = 1; + } + + if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) && + !(params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD)) + writer_takes_lock = 0; + + /* Store all keys and leave the first entry as a dummy entry for lookup_bulk */ + if (use_local_cache) + /* + * Increase number of slots by total number of indices + * that can be stored in the lcore caches + * except for the first cache + */ + num_key_slots = params->entries + (RTE_MAX_LCORE - 1) * + (LCORE_CACHE_SIZE - 1) + 1; + else + num_key_slots = params->entries + 1; + + snprintf(ring_name, sizeof(ring_name), "HT_%s", params->name); + /* Create ring (Dummy slot index is not enqueued) */ + r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots), + params->socket_id, 0); + if (r == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err; + } + + const uint32_t num_buckets = rte_align32pow2(params->entries) / + RTE_HASH_BUCKET_ENTRIES; + + /* Create ring for extendable buckets. */ + if (ext_table_support) { + snprintf(ext_ring_name, sizeof(ext_ring_name), "HT_EXT_%s", + params->name); + r_ext = rte_ring_create(ext_ring_name, + rte_align32pow2(num_buckets + 1), + params->socket_id, 0); + + if (r_ext == NULL) { + RTE_LOG(ERR, HASH, "ext buckets memory allocation " + "failed\n"); + goto err; + } + } + + snprintf(hash_name, sizeof(hash_name), "HT_%s", params->name); + + rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); + + /* guarantee there's no existing: this is normally already checked + * by ring creation above */ + TAILQ_FOREACH(te, hash_list, next) { + h = (struct rte_hash *) te->data; + if (strncmp(params->name, h->name, RTE_HASH_NAMESIZE) == 0) + break; + } + h = NULL; + if (te != NULL) { + rte_errno = EEXIST; + te = NULL; + goto err_unlock; + } + + te = rte_zmalloc("HASH_TAILQ_ENTRY", sizeof(*te), 0); + if (te == NULL) { + RTE_LOG(ERR, HASH, "tailq entry allocation failed\n"); + goto err_unlock; + } + + h = (struct rte_hash *)rte_zmalloc_socket(hash_name, sizeof(struct rte_hash), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (h == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + + buckets = rte_zmalloc_socket(NULL, + num_buckets * sizeof(struct rte_hash_bucket), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (buckets == NULL) { + RTE_LOG(ERR, HASH, "buckets memory allocation failed\n"); + goto err_unlock; + } + + /* Allocate same number of extendable buckets */ + if (ext_table_support) { + buckets_ext = rte_zmalloc_socket(NULL, + num_buckets * sizeof(struct rte_hash_bucket), + RTE_CACHE_LINE_SIZE, params->socket_id); + if (buckets_ext == NULL) { + RTE_LOG(ERR, HASH, "ext buckets memory allocation " + "failed\n"); + goto err_unlock; + } + /* Populate ext bkt ring. We reserve 0 similar to the + * key-data slot, just in case in future we want to + * use bucket index for the linked list and 0 means NULL + * for next bucket + */ + for (i = 1; i <= num_buckets; i++) + rte_ring_sp_enqueue(r_ext, (void *)((uintptr_t) i)); + } + + const uint32_t key_entry_size = + RTE_ALIGN(sizeof(struct rte_hash_key) + params->key_len, + KEY_ALIGNMENT); + const uint64_t key_tbl_size = (uint64_t) key_entry_size * num_key_slots; + + k = rte_zmalloc_socket(NULL, key_tbl_size, + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (k == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + + tbl_chng_cnt = rte_zmalloc_socket(NULL, sizeof(uint32_t), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (tbl_chng_cnt == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + +/* + * If x86 architecture is used, select appropriate compare function, + * which may use x86 intrinsics, otherwise use memcmp + */ +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) + /* Select function to compare keys */ + switch (params->key_len) { + case 16: + h->cmp_jump_table_idx = KEY_16_BYTES; + break; + case 32: + h->cmp_jump_table_idx = KEY_32_BYTES; + break; + case 48: + h->cmp_jump_table_idx = KEY_48_BYTES; + break; + case 64: + h->cmp_jump_table_idx = KEY_64_BYTES; + break; + case 80: + h->cmp_jump_table_idx = KEY_80_BYTES; + break; + case 96: + h->cmp_jump_table_idx = KEY_96_BYTES; + break; + case 112: + h->cmp_jump_table_idx = KEY_112_BYTES; + break; + case 128: + h->cmp_jump_table_idx = KEY_128_BYTES; + break; + default: + /* If key is not multiple of 16, use generic memcmp */ + h->cmp_jump_table_idx = KEY_OTHER_BYTES; + } +#else + h->cmp_jump_table_idx = KEY_OTHER_BYTES; +#endif + + if (use_local_cache) { + h->local_free_slots = rte_zmalloc_socket(NULL, + sizeof(struct lcore_cache) * RTE_MAX_LCORE, + RTE_CACHE_LINE_SIZE, params->socket_id); + } + + /* Default hash function */ +#if defined(RTE_ARCH_X86) + default_hash_func = (rte_hash_function)rte_hash_crc; +#elif defined(RTE_ARCH_ARM64) + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) + default_hash_func = (rte_hash_function)rte_hash_crc; +#endif + /* Setup hash context */ + snprintf(h->name, sizeof(h->name), "%s", params->name); + h->entries = params->entries; + h->key_len = params->key_len; + h->key_entry_size = key_entry_size; + h->hash_func_init_val = params->hash_func_init_val; + + h->num_buckets = num_buckets; + h->bucket_bitmask = h->num_buckets - 1; + h->buckets = buckets; + h->buckets_ext = buckets_ext; + h->free_ext_bkts = r_ext; + h->hash_func = (params->hash_func == NULL) ? + default_hash_func : params->hash_func; + h->key_store = k; + h->free_slots = r; + h->tbl_chng_cnt = tbl_chng_cnt; + *h->tbl_chng_cnt = 0; + h->hw_trans_mem_support = rte_tm_supported(); + h->use_local_cache = use_local_cache; + h->readwrite_concur_support = readwrite_concur_support; + h->ext_table_support = ext_table_support; + h->writer_takes_lock = writer_takes_lock; + h->no_free_on_del = no_free_on_del; + h->readwrite_concur_lf_support = readwrite_concur_lf_support; + +#if defined(RTE_ARCH_X86) + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE2)) + h->sig_cmp_fn = RTE_HASH_COMPARE_SSE; + else +#endif + h->sig_cmp_fn = RTE_HASH_COMPARE_SCALAR; + + if (h->writer_takes_lock) { + h->readwrite_lock = rte_malloc(NULL, sizeof(rte_rwlock_t), + RTE_CACHE_LINE_SIZE); + if (h->readwrite_lock == NULL) + goto err_unlock; + + rte_rwlock_init(h->readwrite_lock); + } + + /* Populate free slots ring. Entry zero is reserved for key misses. */ + for (i = 1; i < num_key_slots; i++) + rte_ring_sp_enqueue(r, (void *)((uintptr_t) i)); + + te->data = (void *) h; + TAILQ_INSERT_TAIL(hash_list, te, next); + rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + + return h; +err_unlock: + rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); +err: + rte_ring_free(r); + rte_ring_free(r_ext); + rte_free(te); + rte_free(h); + rte_free(buckets); + rte_free(buckets_ext); + rte_free(k); + rte_free(tbl_chng_cnt); + return NULL; +} +BIND_DEFAULT_SYMBOL(rte_hash_create, _v1811, 18.11); +MAP_STATIC_SYMBOL( + struct rte_hash *rte_hash_create( + const struct rte_hash_parameters *params), + rte_hash_create_v1811); void rte_hash_free(struct rte_hash *h) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index c93d1a137..93c7019ec 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -30,13 +30,27 @@ extern "C" { #define RTE_HASH_LOOKUP_BULK_MAX 64 #define RTE_HASH_LOOKUP_MULTI_MAX RTE_HASH_LOOKUP_BULK_MAX -/** Enable Hardware transactional memory support. */ +/** + * @deprecated + * This define will be removed in the next release. + * If the target platform supports hardware transactional memory + * it will be used without user consent as it provides the best possible + * performance. + * + * Enable Hardware transactional memory support. + */ #define RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT 0x01 /** Default behavior of insertion, single writer/multi writer */ #define RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD 0x02 -/** Flag to support reader writer concurrency */ +/** + * @deprecated + * This define will be removed in the next release. + * This library should be thread-safe by default. + * + * Flag to support reader writer concurrency + */ #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY 0x04 /** Flag to indicate the extendabe bucket table feature should be used */ @@ -105,6 +119,10 @@ struct rte_hash; */ struct rte_hash * rte_hash_create(const struct rte_hash_parameters *params); +struct rte_hash * +rte_hash_create_v20(const struct rte_hash_parameters *params); +struct rte_hash * +rte_hash_create_v1811(const struct rte_hash_parameters *params); /** * Set a new hash compare function other than the default one. diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map index 734ae28b0..c72469099 100644 --- a/lib/librte_hash/rte_hash_version.map +++ b/lib/librte_hash/rte_hash_version.map @@ -54,6 +54,13 @@ DPDK_18.08 { } DPDK_16.07; +DPDK_18.11 { + global: + + rte_hash_create; + +} DPDK_18.08; + EXPERIMENTAL { global: From patchwork Thu Nov 1 04:54:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 47638 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C38534F9A; Thu, 1 Nov 2018 05:55:24 +0100 (CET) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id A627D2C2F for ; Thu, 1 Nov 2018 05:55:20 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EDC5C15BE; Wed, 31 Oct 2018 21:55:19 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7567D3F557; Wed, 31 Oct 2018 21:55:19 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Wed, 31 Oct 2018 23:54:53 -0500 Message-Id: <20181101045454.632-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101045454.632-1-honnappa.nagarahalli@arm.com> References: <1539208085-30756-4-git-send-email-yipeng1.wang@intel.com> <20181101045454.632-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 2/3] test/hash: stop using lock ellision and read/write concurreny flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" With the deprecation of RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT flags, the test cases can be simplified. This results in shorter run times. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- lib/librte_hash/rte_hash.h | 2 - test/test/test_hash_multiwriter.c | 20 +-- test/test/test_hash_perf.c | 40 +++--- test/test/test_hash_readwrite.c | 84 ++++--------- test/test/test_hash_readwrite_lf.c | 189 ++++++----------------------- 5 files changed, 82 insertions(+), 253 deletions(-) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 93c7019ec..e7e3397d5 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -32,7 +32,6 @@ extern "C" { /** * @deprecated - * This define will be removed in the next release. * If the target platform supports hardware transactional memory * it will be used without user consent as it provides the best possible * performance. @@ -46,7 +45,6 @@ extern "C" { /** * @deprecated - * This define will be removed in the next release. * This library should be thread-safe by default. * * Flag to support reader writer concurrency diff --git a/test/test/test_hash_multiwriter.c b/test/test/test_hash_multiwriter.c index d447f6dca..5469fb705 100644 --- a/test/test/test_hash_multiwriter.c +++ b/test/test/test_hash_multiwriter.c @@ -46,8 +46,6 @@ uint32_t rounded_nb_total_tsx_insertion; static rte_atomic64_t gcycles; static rte_atomic64_t ginsertions; -static int use_htm; - static int test_hash_multiwriter_worker(void *arg) { @@ -113,13 +111,9 @@ test_hash_multiwriter(void) .hash_func_init_val = 0, .socket_id = rte_socket_id(), }; - if (use_htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT - | RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + + hash_params.extra_flag = + RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; struct rte_hash *handle; char name[RTE_HASH_NAMESIZE]; @@ -272,19 +266,15 @@ test_hash_multiwriter_main(void) if (!rte_tm_supported()) { printf("Hardware transactional memory (lock elision) " "is NOT supported\n"); + printf("Test multi-writer without Hardware transactional " + "memory\n"); } else { printf("Hardware transactional memory (lock elision) " "is supported\n"); printf("Test multi-writer with Hardware transactional memory\n"); - - use_htm = 1; - if (test_hash_multiwriter() < 0) - return -1; } - printf("Test multi-writer without Hardware transactional memory\n"); - use_htm = 0; if (test_hash_multiwriter() < 0) return -1; diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 525211180..03facd22a 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_hash_perf.c @@ -79,7 +79,7 @@ static struct rte_hash_parameters ut_params = { static int create_table(unsigned int with_data, unsigned int table_index, - unsigned int with_locks, unsigned int ext) + unsigned int ext) { char name[RTE_HASH_NAMESIZE]; @@ -89,17 +89,11 @@ create_table(unsigned int with_data, unsigned int table_index, else sprintf(name, "test_hash%d", hashtest_key_lens[table_index]); - - if (with_locks) - ut_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT - | RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY; + if (ext) + ut_params.extra_flag = RTE_HASH_EXTRA_FLAGS_EXT_TABLE; else ut_params.extra_flag = 0; - if (ext) - ut_params.extra_flag |= RTE_HASH_EXTRA_FLAGS_EXT_TABLE; - ut_params.name = name; ut_params.key_len = hashtest_key_lens[table_index]; ut_params.socket_id = rte_socket_id(); @@ -516,8 +510,7 @@ reset_table(unsigned table_index) } static int -run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks, - unsigned int ext) +run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int ext) { unsigned i, j, with_data, with_hash; @@ -526,7 +519,7 @@ run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks, for (with_data = 0; with_data <= 1; with_data++) { for (i = 0; i < NUM_KEYSIZES; i++) { - if (create_table(with_data, i, with_locks, ext) < 0) + if (create_table(with_data, i, ext) < 0) return -1; if (get_input_keys(with_pushes, i, ext) < 0) @@ -669,25 +662,20 @@ fbk_hash_perf_test(void) static int test_hash_perf(void) { - unsigned int with_pushes, with_locks; - for (with_locks = 0; with_locks <= 1; with_locks++) { - if (with_locks) - printf("\nWith locks in the code\n"); + unsigned int with_pushes; + + for (with_pushes = 0; with_pushes <= 1; with_pushes++) { + if (with_pushes == 0) + printf("\nALL ELEMENTS IN PRIMARY LOCATION\n"); else - printf("\nWithout locks in the code\n"); - for (with_pushes = 0; with_pushes <= 1; with_pushes++) { - if (with_pushes == 0) - printf("\nALL ELEMENTS IN PRIMARY LOCATION\n"); - else - printf("\nELEMENTS IN PRIMARY OR SECONDARY LOCATION\n"); - if (run_all_tbl_perf_tests(with_pushes, with_locks, 0) < 0) - return -1; - } + printf("\nELEMENTS IN PRIMARY OR SECONDARY LOCATION\n"); + if (run_all_tbl_perf_tests(with_pushes, 0) < 0) + return -1; } printf("\n EXTENDABLE BUCKETS PERFORMANCE\n"); - if (run_all_tbl_perf_tests(1, 0, 1) < 0) + if (run_all_tbl_perf_tests(1, 1) < 0) return -1; if (fbk_hash_perf_test() < 0) diff --git a/test/test/test_hash_readwrite.c b/test/test/test_hash_readwrite.c index 01f986cf4..d389723aa 100644 --- a/test/test/test_hash_readwrite.c +++ b/test/test/test_hash_readwrite.c @@ -35,7 +35,7 @@ struct perf { uint32_t read_write_w[NUM_TEST]; }; -static struct perf htm_results, non_htm_results; +static struct perf results; struct { uint32_t *keys; @@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg) } static int -init_params(int use_ext, int use_htm, int use_jhash) +init_params(int use_ext, int use_jhash) { unsigned int i; @@ -140,15 +140,8 @@ init_params(int use_ext, int use_htm, int use_jhash) else hash_params.hash_func = rte_hash_crc; - if (use_htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag = + RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; if (use_ext) hash_params.extra_flag |= @@ -195,7 +188,7 @@ init_params(int use_ext, int use_htm, int use_jhash) } static int -test_hash_readwrite_functional(int use_ext, int use_htm) +test_hash_readwrite_functional(int use_ext) { unsigned int i; const void *next_key; @@ -214,7 +207,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm) rte_atomic64_init(&ginsertions); rte_atomic64_clear(&ginsertions); - if (init_params(use_ext, use_htm, use_jhash) != 0) + if (init_params(use_ext, use_jhash) != 0) goto err; if (use_ext) @@ -351,8 +344,7 @@ test_rw_writer(void *arg) } static int -test_hash_readwrite_perf(struct perf *perf_results, int use_htm, - int reader_faster) +test_hash_readwrite_perf(struct perf *perf_results, int reader_faster) { unsigned int n; int ret; @@ -379,7 +371,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, rte_atomic64_init(&gwrite_cycles); rte_atomic64_clear(&gwrite_cycles); - if (init_params(0, use_htm, use_jhash) != 0) + if (init_params(0, use_jhash) != 0) goto err; /* @@ -608,12 +600,11 @@ test_hash_readwrite_main(void) { /* * Variables used to choose different tests. - * use_htm indicates if hardware transactional memory should be used. * reader_faster indicates if the reader threads should finish earlier * than writer threads. This is to timing either reader threads or * writer threads for performance numbers. */ - int use_htm, use_ext, reader_faster; + int use_ext, reader_faster; unsigned int i = 0, core_id = 0; if (rte_lcore_count() <= 2) { @@ -634,69 +625,40 @@ test_hash_readwrite_main(void) "is supported\n"); printf("Test read-write with Hardware transactional memory\n"); - - use_htm = 1; - use_ext = 0; - - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - reader_faster = 1; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; - - reader_faster = 0; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; } else { printf("Hardware transactional memory (lock elision) " "is NOT supported\n"); + + printf("Test read-write without Hardware transactional " + "memory\n"); } - printf("Test read-write without Hardware transactional memory\n"); - use_htm = 0; use_ext = 0; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + if (test_hash_readwrite_functional(use_ext) < 0) return -1; use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + if (test_hash_readwrite_functional(use_ext) < 0) return -1; reader_faster = 1; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) + if (test_hash_readwrite_perf(&results, reader_faster) < 0) return -1; + reader_faster = 0; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) + if (test_hash_readwrite_perf(&results, reader_faster) < 0) return -1; printf("Results summary:\n"); - printf("single read: %u\n", htm_results.single_read); - printf("single write: %u\n", htm_results.single_write); + printf("single read: %u\n", results.single_read); + printf("single write: %u\n", results.single_write); for (i = 0; i < NUM_TEST; i++) { printf("core_cnt: %u\n", core_cnt[i]); - printf("HTM:\n"); - printf("read only: %u\n", htm_results.read_only[i]); - printf("write only: %u\n", htm_results.write_only[i]); - printf("read-write read: %u\n", htm_results.read_write_r[i]); - printf("read-write write: %u\n", htm_results.read_write_w[i]); - - printf("non HTM:\n"); - printf("read only: %u\n", non_htm_results.read_only[i]); - printf("write only: %u\n", non_htm_results.write_only[i]); - printf("read-write read: %u\n", - non_htm_results.read_write_r[i]); - printf("read-write write: %u\n", - non_htm_results.read_write_w[i]); + printf("read only: %u\n", results.read_only[i]); + printf("write only: %u\n", results.write_only[i]); + printf("read-write read: %u\n", results.read_write_r[i]); + printf("read-write write: %u\n", results.read_write_w[i]); } return 0; diff --git a/test/test/test_hash_readwrite_lf.c b/test/test/test_hash_readwrite_lf.c index cbfd93226..9d459aeb8 100644 --- a/test/test/test_hash_readwrite_lf.c +++ b/test/test/test_hash_readwrite_lf.c @@ -22,20 +22,9 @@ #define BULK_LOOKUP_SIZE 32 -#define RUN_WITH_HTM_DISABLED 0 - -#if (RUN_WITH_HTM_DISABLED) - -#define TOTAL_ENTRY (5*1024) -#define TOTAL_INSERT (5*1024) - -#else - #define TOTAL_ENTRY (4*1024*1024) #define TOTAL_INSERT (4*1024*1024) -#endif - #define READ_FAIL 1 #define READ_PASS_NO_KEY_SHIFTS 2 #define READ_PASS_SHIFT_PATH 4 @@ -53,7 +42,7 @@ struct rwc_perf { uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST]; }; -static struct rwc_perf rwc_lf_results, rwc_non_lf_results; +static struct rwc_perf rwc_lf_results; struct { uint32_t *keys; @@ -395,7 +384,7 @@ generate_keys(void) } static int -init_params(int rwc_lf, int use_jhash, int htm) +init_params(int use_jhash) { struct rte_hash *handle; @@ -411,19 +400,8 @@ init_params(int rwc_lf, int use_jhash, int htm) else hash_params.hash_func = rte_hash_crc; - if (rwc_lf) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else if (htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD | + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; hash_params.name = "tests"; @@ -580,8 +558,7 @@ test_rwc_multi_writer(__attribute__((unused)) void *arg) * Reader(s) lookup keys present in the table. */ static int -test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -592,7 +569,7 @@ test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - no key-shifts, read - hit\n"); for (m = 0; m < 2; m++) { @@ -649,8 +626,7 @@ test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, * 'Main' thread adds with no key-shifts. */ static int -test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -662,7 +638,7 @@ test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - no key-shifts, Hash lookup - miss\n"); for (m = 0; m < 2; m++) { @@ -721,8 +697,7 @@ test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, * shift path while 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, - int rwc_lf, int htm) +test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -734,7 +709,7 @@ test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - hit" " (non-shift-path)\n"); @@ -797,8 +772,7 @@ test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, * 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -810,7 +784,7 @@ test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - hit (shift-path)" "\n"); @@ -873,8 +847,7 @@ test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, * 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int - htm) +test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -886,7 +859,7 @@ test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - miss\n"); for (m = 0; m < 2; m++) { @@ -948,8 +921,7 @@ test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int * Writers are running in parallel, on different data plane cores. */ static int -test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results) { unsigned int n, m, k; uint64_t i; @@ -960,7 +932,7 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Multi-add-lookup\n"); uint8_t pos_core; @@ -1048,14 +1020,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, static int test_hash_readwrite_lf_main(void) { - /* - * Variables used to choose different tests. - * rwc_lf indicates if read-write concurrency lock-free support is - * enabled. - * htm indicates if Hardware transactional memory support is enabled. - */ - int rwc_lf = 0; - int htm; int use_jhash = 0; if (rte_lcore_count() == 1) { printf("More than one lcore is required " @@ -1065,12 +1029,7 @@ test_hash_readwrite_lf_main(void) setlocale(LC_NUMERIC, ""); - if (rte_tm_supported()) - htm = 1; - else - htm = 0; - - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) return -1; if (generate_keys() != 0) return -1; @@ -1078,133 +1037,65 @@ test_hash_readwrite_lf_main(void) return -1; if (RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) { - rwc_lf = 1; - printf("Test lookup with read-write concurrency lock free support" - " enabled\n"); - if (test_hash_add_no_ks_lookup_hit(&rwc_lf_results, rwc_lf, - htm) < 0) + printf("Test lookup with read-write concurrency lock free " + "support enabled\n"); + if (test_hash_add_no_ks_lookup_hit(&rwc_lf_results) < 0) return -1; - if (test_hash_add_no_ks_lookup_miss(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_no_ks_lookup_miss(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_hit_non_sp(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_ks_lookup_hit_non_sp(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_hit_sp(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_ks_lookup_hit_sp(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_miss(&rwc_lf_results, rwc_lf, htm) - < 0) + if (test_hash_add_ks_lookup_miss(&rwc_lf_results) < 0) return -1; - if (test_hash_multi_add_lookup(&rwc_lf_results, rwc_lf, htm) - < 0) + if (test_hash_multi_add_lookup(&rwc_lf_results) < 0) return -1; } - printf("\nTest lookup with read-write concurrency lock free support" - " disabled\n"); - rwc_lf = 0; - if (!htm) { - printf("With HTM Disabled\n"); - if (!RUN_WITH_HTM_DISABLED) { - printf("Enable RUN_WITH_HTM_DISABLED to test with" - " lock-free disabled"); - goto results; - } - } else - printf("With HTM Enabled\n"); - if (test_hash_add_no_ks_lookup_hit(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_no_ks_lookup_miss(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_ks_lookup_hit_non_sp(&rwc_non_lf_results, rwc_lf, - htm) < 0) - return -1; - if (test_hash_add_ks_lookup_hit_sp(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_ks_lookup_miss(&rwc_non_lf_results, rwc_lf, htm) < 0) - return -1; - if (test_hash_multi_add_lookup(&rwc_non_lf_results, rwc_lf, htm) < 0) - return -1; -results: + printf("\n\t\t\t\t\t\t********** Results summary **********\n\n"); int i, j, k; for (j = 0; j < 2; j++) { if (j == 1) printf("\n\t\t\t\t\t#######********** Bulk Lookup " "**********#######\n\n"); - printf("_______\t\t_______\t\t_________\t___\t\t_________\t\t" - "\t\t\t\t_________________\n"); - printf("Writers\t\tReaders\t\tLock-free\tHTM\t\tTest-case\t\t\t" + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); + printf("Writers\t\tReaders\t\tTest-case\t\t\t" "\t\t\tCycles per lookup\n"); - printf("_______\t\t_______\t\t_________\t___\t\t_________\t\t\t" + printf("_______\t\t_______\t\t_________\t\t\t" "\t\t\t_________________\n"); for (i = 0; i < NUM_TEST; i++) { printf("%u\t\t%u\t\t", 1, rwc_core_cnt[i]); - printf("Enabled\t\t"); - printf("N/A\t\t"); printf("Hash add - no key-shifts, lookup - hit\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", + "%u\n\t\t\t\t", rwc_lf_results.w_no_ks_r_hit[j][i]); printf("Hash add - no key-shifts, lookup - miss\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", + "%u\n\t\t\t\t", rwc_lf_results.w_no_ks_r_miss[j][i]); printf("Hash add - key-shifts, lookup - hit" - "(non-shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", + "(non-shift-path)\t\t%u\n\t\t\t\t", rwc_lf_results.w_ks_r_hit_nsp[j][i]); printf("Hash add - key-shifts, lookup - hit " - "(shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", + "(shift-path)\t\t%u\n\t\t\t\t", rwc_lf_results.w_ks_r_hit_sp[j][i]); printf("Hash add - key-shifts, Hash lookup miss\t\t\t\t" - "%u\n\n\t\t\t\t", + "%u\n\n", rwc_lf_results.w_ks_r_miss[j][i]); - printf("Disabled\t"); - if (htm) - printf("Enabled\t\t"); - else - printf("Disabled\t"); - printf("Hash add - no key-shifts, lookup - hit\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_no_ks_r_hit[j][i]); - printf("Hash add - no key-shifts, lookup - miss\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_no_ks_r_miss[j][i]); - printf("Hash add - key-shifts, lookup - hit " - "(non-shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_ks_r_hit_nsp[j][i]); - printf("Hash add - key-shifts, lookup - hit " - "(shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_ks_r_hit_sp[j][i]); - printf("Hash add - key-shifts, Hash lookup miss\t\t\t\t" - "%u\n", rwc_non_lf_results.w_ks_r_miss[j][i]); - - printf("_______\t\t_______\t\t_________\t___\t\t" - "_________\t\t\t\t\t\t_________________\n"); + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); } for (i = 1; i < NUM_TEST; i++) { for (k = 0; k < NUM_TEST; k++) { printf("%u", rwc_core_cnt[i]); printf("\t\t%u\t\t", rwc_core_cnt[k]); - printf("Enabled\t\t"); - printf("N/A\t\t"); - printf("Multi-add-lookup\t\t\t\t\t\t%u\n\n\t\t" - "\t\t", + printf("Multi-add-lookup\t\t\t\t\t\t%u\n\n", rwc_lf_results.multi_rw[i][j][k]); - printf("Disabled\t"); - if (htm) - printf("Enabled\t\t"); - else - printf("Disabled\t"); - printf("Multi-add-lookup\t\t\t\t\t\t%u\n", - rwc_non_lf_results.multi_rw[i][j][k]); - printf("_______\t\t_______\t\t_________\t___" - "\t\t_________\t\t\t\t\t\t" - "_________________\n"); + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); } } } From patchwork Thu Nov 1 04:54:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 47639 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 24D855398; Thu, 1 Nov 2018 05:55:26 +0100 (CET) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 4A1034CB5 for ; Thu, 1 Nov 2018 05:55:21 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 71A8B15BF; Wed, 31 Oct 2018 21:55:20 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0281C3F557; Wed, 31 Oct 2018 21:55:19 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Wed, 31 Oct 2018 23:54:54 -0500 Message-Id: <20181101045454.632-4-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101045454.632-1-honnappa.nagarahalli@arm.com> References: <1539208085-30756-4-git-send-email-yipeng1.wang@intel.com> <20181101045454.632-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 3/3] doc/hash: deprecate lock ellision and read/write concurreny flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT configuration flags are deprecated. Reader/Writer concurrency is provided by default. Transactional memory will be used if the platform supports it. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- doc/guides/rel_notes/deprecation.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 34b28234c..d34cca260 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -55,3 +55,8 @@ Deprecation Notices - ``rte_pdump_set_socket_dir`` will be removed; - The parameter, ``path``, of ``rte_pdump_init`` will be removed; - The enum ``rte_pdump_socktype`` will be removed. + +* hash: The configuration flags RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and + RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT will be removed in v19.02. + Reader/writer concurrency will be supported by default. The library will + use transactional memory if the platform supports it.