Skip to content

Instantly share code, notes, and snippets.

@fsaintjacques
Last active August 29, 2015 14:25
Show Gist options
  • Save fsaintjacques/af6878bf57300e580355 to your computer and use it in GitHub Desktop.
Save fsaintjacques/af6878bf57300e580355 to your computer and use it in GitHub Desktop.
X86 locked-counters
{ x=0; }
P0 | P1 ;
LOCK ADD [x],1 | LOCK ADD [x],1 ;
exists (x=2)
X86 counters
{ x=0; }
P0 | P1 ;
ADD [x],1 | ADD [x],1 ;
exists (x=2)
2delilah:x86-experiments/ $ lscpu -e
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0 0:0:0:0 yes 3400.0000 1200.0000
1 0 0 1 1:1:1:0 yes 3400.0000 1200.0000
2 0 0 2 2:2:2:0 yes 3400.0000 1200.0000
3 0 0 3 3:3:3:0 yes 3400.0000 1200.0000
4 0 0 4 4:4:4:0 yes 3400.0000 1200.0000
5 0 0 5 5:5:5:0 yes 3400.0000 1200.0000
6 1 1 6 6:6:6:1 yes 3400.0000 1200.0000
7 1 1 7 7:7:7:1 yes 3400.0000 1200.0000
8 1 1 8 8:8:8:1 yes 3400.0000 1200.0000
9 1 1 9 9:9:9:1 yes 3400.0000 1200.0000
10 1 1 10 10:10:10:1 yes 3400.0000 1200.0000
11 1 1 11 11:11:11:1 yes 3400.0000 1200.0000
12 2 2 12 12:12:12:2 yes 3400.0000 1200.0000
13 2 2 13 13:13:13:2 yes 3400.0000 1200.0000
14 2 2 14 14:14:14:2 yes 3400.0000 1200.0000
15 2 2 15 15:15:15:2 yes 3400.0000 1200.0000
16 2 2 16 16:16:16:2 yes 3400.0000 1200.0000
17 2 2 17 17:17:17:2 yes 3400.0000 1200.0000
18 3 3 18 18:18:18:3 yes 3400.0000 1200.0000
19 3 3 19 19:19:19:3 yes 3400.0000 1200.0000
20 3 3 20 20:20:20:3 yes 3400.0000 1200.0000
21 3 3 21 21:21:21:3 yes 3400.0000 1200.0000
22 3 3 22 22:22:22:3 yes 3400.0000 1200.0000
23 3 3 23 23:23:23:3 yes 3400.0000 1200.0000
2delilah:x86-experiments/ $ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5
node 0 size: 32214 MB
node 0 free: 194 MB
node 1 cpus: 6 7 8 9 10 11
node 1 size: 32319 MB
node 1 free: 85 MB
node 2 cpus: 12 13 14 15 16 17
node 2 size: 32319 MB
node 2 free: 121 MB
node 3 cpus: 18 19 20 21 22 23
node 3 size: 32318 MB
node 3 free: 82 MB
node distances:
node 0 1 2 3
0: 10 21 30 21
1: 21 10 21 30
2: 30 21 10 21
3: 21 30 21 10
2delilah:x86-experiments/ $ taskset -c 1,2 litmus -s 5M *.litmus|grep -B3 -A1 'Observation '
Positive: 49961986, Negative: 38014
Condition exists (x=2) is validated
Hash=8485730e1663c2afd966ab3899e4a5ee
Observation counters Sometimes 49961986 38014
Time counters 13.85
--
Positive: 50000000, Negative: 0
Condition exists (x=2) is validated
Hash=cc1925c3ce345262d7a609705d2e8dcf
Observation locked-counters Always 50000000 0
Time locked-counters 15.36
2delilah:x86-experiments/ $ taskset -c 1,6 litmus -s 5M *.litmus|grep -B3 -A1 'Observation '
Positive: 47219304, Negative: 2780696
Condition exists (x=2) is validated
Hash=8485730e1663c2afd966ab3899e4a5ee
Observation counters Sometimes 47219304 2780696
Time counters 37.92
--
Positive: 50000000, Negative: 0
Condition exists (x=2) is validated
Hash=cc1925c3ce345262d7a609705d2e8dcf
Observation locked-counters Always 50000000 0
Time locked-counters 41.67
2delilah:x86-experiments/ $ taskset -c 1,12 litmus -s 5M *.litmus|grep -B3 -A1 'Observation '
Positive: 48281534, Negative: 1718466
Condition exists (x=2) is validated
Hash=8485730e1663c2afd966ab3899e4a5ee
Observation counters Sometimes 48281534 1718466
Time counters 37.66
--
Positive: 50000000, Negative: 0
Condition exists (x=2) is validated
Hash=cc1925c3ce345262d7a609705d2e8dcf
Observation locked-counters Always 50000000 0
Time locked-counters 41.77
taskset -c 1,12 litmus -s 5M *.litmus 148.24s user 0.35s system 182% cpu 1:21.22 total
grep --color=auto -B3 -A1 'Observation ' 0.00s user 0.00s system 0% cpu 1:21.22 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment