Check out the new USENIX Web site. next up previous
Next: Translations at Each Use Up: Fine-grained Address Translation Previous: Fine-grained Address Translation

Fine-grained Swizzling

A straightforward way of implementing fine-grained address translation is to cache the translated address value in the pointer field itself; we call this fine-grained swizzling, because the pointer value is cached after being translated.17 We chose not to follow this approach because of a few problems with the basic technique.

First, fine-grained swizzling incurs checking overhead for every pointer dereference; the first dereference will check and swizzle the pointer, while future dereferences will check (and find) that the swizzled virtual address is already available and can be used directly. A more significant problem is presented by equality checks (a la the C++ == operator)--when two smart pointers are compared, the comparison can only be made after ensuring that both pointers are in the same representation, that is, either both are persistent addresses or both are virtual addresses. In the worst-case scenario, the pointers will be in different representations, and one of them will have to be swizzled before the check can complete. Thus, a simple equality check, on average, can become more expensive than desired.

One solution is to make the pointer field large enough to store both persistent and virtual address values, as in E [15,16]. In the current context, the smart pointer internal representation could be extended such that it can hold both the pointer fields. This technique avoids the overhead on equality checks, which can be implemented by simply comparing persistent addresses without regard to swizzling, at the expense of additional storage.

Unfortunately, a more serious problem with fine-grained swizzling is presented by its peculiar interaction with checkpointing. When a persistent pointer is swizzled, the virtual address has to be cached in the pointer field (either E-style or otherwise), that is, we must modify the pointer. Since virtual memory protections are used to detect updates initiated by the application for checkpointing purposes, updating a smart pointer to cache the swizzled address will generate ``false positives'' for updates, causing unnecessary checkpointing. We could work around this problem by first resetting the permissions on the page, swizzling (and caching) the pointer, and then restoring the permissions on the page. However, this is very slow on average because it requires kernel intervention to change page protections.



Footnotes

... translated.17
The term ``swizzling'' implies that the translated address is cached, as opposed to discarded after use.

next up previous
Next: Translations at Each Use Up: Fine-grained Address Translation Previous: Fine-grained Address Translation

Sheetal V. Kakkad