From ff3c302d5e137d9653c656eee016bacf5d988d66 Mon Sep 17 00:00:00 2001 From: jdybnis Date: Thu, 19 Mar 2009 06:59:31 +0000 Subject: [PATCH] fix typos add to todo --- map/skiplist.c | 4 ++-- map/unsafe_skiplist.c | 4 ++-- todo | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/map/skiplist.c b/map/skiplist.c index 0746c00..f92d140 100644 --- a/map/skiplist.c +++ b/map/skiplist.c @@ -27,7 +27,7 @@ #include "rcu.h" // Setting MAX_LEVELS to 1 essentially makes this data structure the Harris-Michael lock-free list (see list.c). -#define MAX_LEVELS 15 +#define MAX_LEVELS 24 enum unlink { FORCE_UNLINK, @@ -66,7 +66,7 @@ static inline node_t * STRIP_MARK(markable_t x) { return ((node_t *)STRIP_TAG(x, #endif static int random_levels (skiplist_t *sl) { - unsigned r = nbd_rand(); + uint64_t r = nbd_rand(); int z = __builtin_ctz(r); int levels = (int)(z / 1.5); if (levels == 0) diff --git a/map/unsafe_skiplist.c b/map/unsafe_skiplist.c index 596dcde..ee755f3 100644 --- a/map/unsafe_skiplist.c +++ b/map/unsafe_skiplist.c @@ -13,7 +13,7 @@ #include "runtime.h" #include "mem.h" -#define MAX_LEVELS 32 +#define MAX_LEVELS 24 typedef struct node { map_key_t key; @@ -33,7 +33,7 @@ struct sl { }; static int random_levels (skiplist_t *sl) { - unsigned r = nbd_rand(); + uint64_t r = nbd_rand(); int z = __builtin_ctz(r); int levels = (int)(z / 1.5); if (levels == 0) diff --git a/todo b/todo index ad68a8e..67b75dc 100644 --- a/todo +++ b/todo @@ -9,8 +9,6 @@ quality ------- - verify the memory management of keys in list, skiplist, and hashtable - transaction tests -- port perf tests from lib-high-scale -- characterize the performance of hashtable vs. skiplist vs. list - validate function arguments in interface functions - document usage - document algorithms @@ -22,11 +20,12 @@ optimization - use a shared scan for write-set validation in txn, similar to ht copy logic - experiment with the performance impact of not passing the hash between functions in ht - experiment with embedding the nstring keys in the list/skiplist nodes +- lower skiplist's high_water when the actual number of levels in use drops +- non-power-of 2 sized hashtables for improved memory usage +- mem2 features -------- - allow values of 0 to be inserted into maps (change DOES_NOT_EXIST to something other than 0) - read-committed type transactions - recycle free regions across size-classes and between threads - - -- 2.40.0