Commit 1d55140
committed
use the right hashpower for the item_locks table
For some reason I can't understand, I was accessing item_locks via the main
hash table's power level, then modulus'ed to the number of item locks.
hashpower can change as the hash table grows, except it only ever changes
while no item locks are being held (via the item_global_lock synchronization
bits). The item_locks hashpower is static for the duration.
So this isn't a safety issue, but instead just using the hash table wrong
and doing an extra modulus.
As an aside, this does improve benchmarks by a tiny bit.1 parent d8b1047 commit 1d55140
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
| 807 | + | |
806 | 808 | | |
807 | 809 | | |
808 | 810 | | |
| |||
0 commit comments