3 ms·
It's interesting that the conditional read barrier is so cheap (4% overhead on SPECjbb). In past work, read barriers have been considered relatively high overhe
by rayiner 8y ago
It's interesting that the conditional read barrier is so cheap (4% overhead on SPECjbb). In past work, read barriers have been considered relatively high overhead and thus algorithms dependent on them avoided for that reason. For example: https://hosking.github.io/links/Yang+2012ISMM.pdf https://hosking.github.io/links/Yang+2012ISMM.pdf (see Table 3 on page 41).
- giltene 8y agoIt is an LVB (a Loaded [reference] Value Barrier), as documented and fully descibed in https://www.azul.com/files/c4_paper_acm.pdf https://www.azul.com/files/c4_paper_acm.pdf. The Mark/Compact GC algorithm used by ZGC (see section 2 in the paper) and the LVB barrier that powers it in the ZGC implementation are identical to the ones C4 uses in each of its generations, including the details of barrier invariants and guanatees, self healing, use of (non-addressing) metadata information in references, and even the collector phase behavior down to the mark/remap overlap are all the same. As expalined in the paper, the self-healing nature of the LVB (first described and implemented in https://www.usenix.org/legacy/events/vee05/full_papers/p46-click.pdf https://www.usenix.org/legacy/events/vee05/full_papers/p46-c...) makes its actual dynamic cost several orders of magnitude smaller (e.g. during lengthy concurrent GC cycles) than that of prior read barrier approaches (which tend to have a "hot slow path" during long periods of GC cycle execution), making LVB quite practical for use in high throughoput collector implementations.
- pron 8y agoBTW, it's not a read barrier but a load barrier. It's not encountered every time when reading an object field, but only when reading object reference that's stored on the heap (i.e. loading it into a register).
- rayiner 8y agoIsn’t that the traditional definition of a read barrier? E.g. a Baker read barrier is triggered when a field of object reference type is loaded from a heap object. It checks if the loaded pointer is in from space, and if so forwards the object.
- deleted 8y ago[deleted]
- sitkack 8y agoit would be interesting to have a database of small assumptions (Do(S)A) and watch how they evolve over time. Seems like a common theme in innovation is to spot the assumption inversion and make the obvious move.