Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add vatDecRef to kernel, offer to liveslots #1926

Merged
merged 1 commit into from
Oct 27, 2020
Merged

Conversation

warner
Copy link
Member

@warner warner commented Oct 26, 2020

In the future, when liveslots implements GC and discovers that a Presence has
ceased to be referenced by the user-level vat code, it will call this
function to decrement the kernel's reference count for the imported object's
c-list entry.

vatDecRef might be called at any time (although always in its own turn).
The kernel will eventually add the decref information to a queue, to be
processed between cranks. For now, the kernel only records the information if
an option was set to enable it (for future unit tests).

Most of this patch is the kernel-worker protocol wiring to allow
child-process vat workers to deliver the decref back up to the kernel
process.

Liveslots does not use this yet. A future patch will switch it on.

refs #1872

@warner warner added the SwingSet package: SwingSet label Oct 26, 2020
@warner warner requested a review from FUDCo October 26, 2020 20:42
@warner warner self-assigned this Oct 26, 2020
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine for what it is, though I remain just a little concerned that this is implementation running ahead of the design. Not a reason not to go with it, but reason to be cautious.

In the future, when liveslots implements GC and discovers that a Presence has
ceased to be referenced by the user-level vat code, it will call this
function to decrement the kernel's reference count for the imported object's
c-list entry.

`vatDecRef` might be called at any time (although always in its own turn).
The kernel will eventually add the decref information to a queue, to be
processed between cranks. For now, the kernel only records the information if
an option was set to enable it (for future unit tests).

Most of this patch is the kernel-worker protocol wiring to allow
child-process vat workers to deliver the decref back up to the kernel
process.

Liveslots does not use this yet. A future patch will switch it on.

refs #1872
@warner warner force-pushed the 1872-add-vatdecref branch from 464c386 to f0721d9 Compare October 27, 2020 16:30
Base automatically changed from 1872-gctools to master October 27, 2020 17:02
@warner warner merged commit 527b44a into master Oct 27, 2020
@warner warner deleted the 1872-add-vatdecref branch October 27, 2020 17:03
@warner warner mentioned this pull request Oct 28, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants