Commit 3c512e6
committed
btl/sm: rewrite of fast box (per-peer receive buffers)
I was investigating possibly lost btl/sm messages and realized that the code is
difficult to follow and it is not always clear what I was attempting to do. It
is not clear if there is a problem but the rewrite is worth committing.
This change does the following:
- Seperate the fast box metadata out from the fast box receive data. These
parts are logically separate so there was no need to keep adjusting the
offset based on the metadata (start of buffer was offset 64, now 0).
- Use modulo-math instead of toggling an extra bit to determine full vs
empty. To keep this fast the modulo is done with bitwise-and with a
mask and the fast box size has been limited to a power of two. This
change simplifies the math and only has one special case to cover (
end overflow-- end less than start).
- General cleanup of the code overall to improve readability.
Signed-off-by: Nathan Hjelm <[email protected]>1 parent 4d4f721 commit 3c512e6
File tree
4 files changed
+229
-200
lines changed- opal/mca/btl/sm
4 files changed
+229
-200
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | | - | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
0 commit comments