]> pd.if.org Git - nbds/commitdiff
fix typos
authorjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Thu, 19 Mar 2009 06:59:31 +0000 (06:59 +0000)
committerjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Thu, 19 Mar 2009 06:59:31 +0000 (06:59 +0000)
add to todo

map/skiplist.c
map/unsafe_skiplist.c
todo

index 0746c00ed75b754aea4d3e876975b40efac548ec..f92d1405de0e5a0881d27eb74f70dac767a88ef1 100644 (file)
@@ -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).
 #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,
 
 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) {
 #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)
     int z = __builtin_ctz(r);
     int levels = (int)(z / 1.5);
     if (levels == 0)
index 596dcde423da48c69399a7e02bb60c562ad5e681..ee755f333f52333639f6f0b227e83509bcfc634d 100644 (file)
@@ -13,7 +13,7 @@
 #include "runtime.h"
 #include "mem.h"
 
 #include "runtime.h"
 #include "mem.h"
 
-#define MAX_LEVELS 32
+#define MAX_LEVELS 24
 
 typedef struct node {
     map_key_t key;
 
 typedef struct node {
     map_key_t key;
@@ -33,7 +33,7 @@ struct sl {
 };
 
 static int random_levels (skiplist_t *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)
     int z = __builtin_ctz(r);
     int levels = (int)(z / 1.5);
     if (levels == 0)
diff --git a/todo b/todo
index ad68a8e294aecdc248d75c90f2c65c51f3986abe..67b75dc6ac0eebafb42b1c188cd9eec75ca18acf 100644 (file)
--- a/todo
+++ b/todo
@@ -9,8 +9,6 @@ quality
 -------
 - verify the memory management of keys in list, skiplist, and hashtable
 - transaction tests
 -------
 - 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
 - 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
 - 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
 
 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
-
-