urcu: add cacheline padding to URCU thread data
authorTodd Lipcon <todd@cloudera.com>
Fri, 21 Apr 2017 23:01:47 +0000 (16:01 -0700)
committerkhizmax <libcds.dev@gmail.com>
Sun, 23 Apr 2017 17:15:53 +0000 (20:15 +0300)
commit433e4a6ef8e2eb9d040c699f0a393850374f89a6
treef4ada9b9ec780f3ab1e37b1f312cf9127b26cef4
parent594d091c1aa21687f898bee9ab8765c9ad5954c5
urcu: add cacheline padding to URCU thread data

The thread-local data was previously smaller than a cacheline, so it was
possible for multiple thread's thread data to be allocated on the same
cacheline and cause false sharing.

I measured the offcore_response.all_data_rd.l3_hit.hitm_other_core
perf counter in a read-only workload with 16 threads executing a
read-only workload against a URCU-protected split-list set. Before, I
saw about 5.6M events per second. After, I saw basically none.

Additionally, 'perf c2c' showed a lot of cache-line bouncing in the URCU
read side critical section before, but now shows none.

I benchmarked the above read-only workload on a machine with 88 logical
cores (Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz) and 88 threads, and
the performance improved more than 2x.

Fixes issue #75
cds/urcu/details/gp_decl.h