edits
[cdsspec-compiler.git] / benchmark / concurrent-hashmap / note.txt
diff --git a/benchmark/concurrent-hashmap/note.txt b/benchmark/concurrent-hashmap/note.txt
new file mode 100644 (file)
index 0000000..f080a48
--- /dev/null
@@ -0,0 +1,17 @@
+#Non-SC:
+The following case can be non-SC.
+
+Thrd1                                          Thrd2
+put(k1, v1); // a                      put(k2, v2); // c
+get(k2); // b                          get(k1); // d
+
+When b and d both read the old head of the list (and they later grab the lock,
+making it the interface SC), it's non-SC because neither reads the updated
+value.
+
+Run testcase1 to make the store and load of value slot to be seq_cst.
+
+Then run testcase2 with "-o annotation" to get store and load of key slot to be
+release/acquire.
+
+0m0.015s + 0m0.000 = 0m0.015s