You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the data feeds (dropImports) and actuators (dropExports) are in place, the biggest remaining subtask of #2615 will be to actually compute the unreachable objects and call dropExports for them.
The easier/cheaper piece of this is plain refcounting:
when we're informed about a refcount being decremented, add it to a candidate list
when we're done decrementing everything, process the list. for each item:
if the refcount is zero, find everything it used to point to, decref them, add them to the candiate list
then delete the item, and schedule it for a dropExports or something
The header/more expensive piece is to deal with cycles. The traditional approach is a full mark-and-sweep collector, but I'm worried about the expense of running that on-chain. @dtribble had an interesting idea: let an off-chain analysis tool compute the members of an unreachable cycle instead. It could submit a special transaction that says "I claim the following object/promise IDs form an unreachable clique". The kernel would then sweep the object graph starting from those points, to 1: make sure there are no edges pointing outside the cycle, and 2: make sure all the refcounts are accounted for by edges from within the clique. If both are true, the whole batch is deleted.
I'm also hopeful that there's some clever way to use bidirectional pointers to avoid any global mark-and-sweep operation, but I haven't sat down to consider the details.
The text was updated successfully, but these errors were encountered:
Vat code can now use `vatPowers.disavow(presence)` (if enabled for that vat),
which will invoke `syscall.dropImports`. The kernel will delete the entry
from the vat's c-list, however no further reference-count management will
occur (that is scheduled for #2646).
This should be enough to allow work to proceed on liveslots (using WeakRef and
FinalizationRegistry) in parallel with kernel-side improvements.
Note that referencing a disavowed object is vat-fatal, either as the target
of a message, the argument of a message, or the resolution of a promise.
closes#2635closes#2636
Vat code can now use `vatPowers.disavow(presence)` (if enabled for that vat),
which will invoke `syscall.dropImports`. The kernel will delete the entry
from the vat's c-list, however no further reference-count management will
occur (that is scheduled for #2646).
This should be enough to allow work to proceed on liveslots (using WeakRef and
FinalizationRegistry) in parallel with kernel-side improvements.
Note that referencing a disavowed object is vat-fatal, either as the target
of a message, the argument of a message, or the resolution of a promise.
closes#2635closes#2636
Vat code can now use `vatPowers.disavow(presence)` (if enabled for that vat),
which will invoke `syscall.dropImports`. The kernel will delete the entry
from the vat's c-list, however no further reference-count management will
occur (that is scheduled for #2646).
This should be enough to allow work to proceed on liveslots (using WeakRef and
FinalizationRegistry) in parallel with kernel-side improvements.
Note that referencing a disavowed object is vat-fatal, either as the target
of a message, the argument of a message, or the resolution of a promise.
closes#2635closes#2636
What is the Problem Being Solved?
Once the data feeds (
dropImports
) and actuators (dropExports
) are in place, the biggest remaining subtask of #2615 will be to actually compute the unreachable objects and calldropExports
for them.The easier/cheaper piece of this is plain refcounting:
dropExports
or somethingThe header/more expensive piece is to deal with cycles. The traditional approach is a full mark-and-sweep collector, but I'm worried about the expense of running that on-chain. @dtribble had an interesting idea: let an off-chain analysis tool compute the members of an unreachable cycle instead. It could submit a special transaction that says "I claim the following object/promise IDs form an unreachable clique". The kernel would then sweep the object graph starting from those points, to 1: make sure there are no edges pointing outside the cycle, and 2: make sure all the refcounts are accounted for by edges from within the clique. If both are true, the whole batch is deleted.
I'm also hopeful that there's some clever way to use bidirectional pointers to avoid any global mark-and-sweep operation, but I haven't sat down to consider the details.
The text was updated successfully, but these errors were encountered: