▲ | Nevermark 4 days ago | |
I can imagine it might be useful to make this a choice for databases with high frequency small swaps and occasional large ones. 1) default, load-compare-&-swap for small fast load/swaps. 2) optional, compare-load-&-swap to allow a large load to pass its compare, and cut in front of all the fast small swap that would otherwise create an un-hittable moving target during its long loads for its own compare. 3) If the load itself was stable relative to the compare, then it could be pre-loaded and swapped into a holding location, followed by as many fast compare-&-swaps as needed to get it into the right location. |