-
Notifications
You must be signed in to change notification settings - Fork 39
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
UIP-0103: Persistent Nock Caching + Loom Migration Framework + Pointer Compression Migration Refactor #508
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
from
September 6, 2023 19:21
3901404
to
0bbe610
Compare
matthew-levan
changed the title
Loom migration "framework" (with pointer compression migration refactor)
Loom migration framework (with pointer compression migration refactor)
Sep 6, 2023
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
2 times, most recently
from
September 8, 2023 19:39
f35cd83
to
8570654
Compare
Notes from @barter-simsum:
Example of a versioned macro:
|
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
2 times, most recently
from
September 15, 2023 16:57
69f75b9
to
4cc9d1e
Compare
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
commented
Sep 15, 2023
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
2 times, most recently
from
September 15, 2023 20:36
6534adc
to
ecb803a
Compare
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
from
September 15, 2023 21:14
ecb803a
to
0f0f562
Compare
matthew-levan
changed the title
Loom migration framework (with pointer compression migration refactor)
UIP-0103: Persistent Nock Caching + Loom Migration Framework + Pointer Compression Migration Refactor
Sep 19, 2023
matthew-levan
commented
Sep 20, 2023
joemfb
requested changes
Sep 20, 2023
joemfb
reviewed
Sep 20, 2023
matthew-levan
force-pushed
the
msl/loom-migration-refactor
branch
from
September 27, 2023 16:08
c4830c0
to
574bf78
Compare
pkova
added a commit
that referenced
this pull request
Nov 8, 2023
This PR adjusts the serf's memory-pressure thresholds, adds state to track threshold events and avoid thrashing ("schmitt trigger"), and refactors post-event operation to use a bitmap and track operations more granularly. These changes are useful on there own, and necessary for adding memory-pressure-based trimming to #508.
joemfb
approved these changes
Nov 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will do
pkova
added a commit
that referenced
this pull request
Nov 10, 2023
This PR dedicates slot 0 to cells (`u3a_minimum`), and aligns subsequent slots on power-of-two boundaries. Previously, slot 0 was unused, and subsequent slots were aligned *near* power-of-two boundaries. For example: | words | old slot | new slot | | --- | - | - | | 6 | 1 | 0 | | 31 | 3 | 2 | | 61 | 4 | 3 | | 62 | 4 | 3 | | 63 | 4 | 3 | | 121 | 5 | 4 | | 122 | 5 | 4 | | 123 | 5 | 4 | | 124 | 5 | 4 | | 125 | 5 | 4 | | 126 | 5 | 4 | | 127 | 5 | 4 | The first issue dates to urbit/urbit#987. Slot 0 was reserved for sizes less than 8, which meant that 7-word allocations on the home road were incredibly slow (as they traversed a free list full of 6 word allocations). The second issue has always been the case in this allocator, due to the way that the size was rounded up on each iteration of the "power-of-two" sizing loop. This PR does not address the infamous size-bumping logic in the allocator: https://github.com/urbit/vere/blob/9bdc1af00f6650e27ac66793c6781d933dd30dfe/pkg/noun/allocate.c#L453-L467 I'm been tempted to disable that behavior on the home-road (to further reduce fragmentation), but I'm not convinced that won't still run into pathological performance issues. The best approach might be to start searching the "proper" free list, but bound the number of iterations before bumping. Either change can be made at any time, without migrations. This PR does requires a migration to move free space into the now-appropriate free-list. It includes a trivial, always on migration, which should be refactored into #508 when appropriate. This PR helps somewhat with urbit/urbit#6805, as it reduces home-road fragmentation.
pkova
added a commit
that referenced
this pull request
Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements UIP-0103, establishes a pattern for implementing loom migrations, and refactors the pointer compression as a compile-time feature instead of a runtime one.
See #496 for original work on UIP-0103.
TODO:
u3a_road
struct++jim
and remove++dedup-message
urbit#6770Ford Lightning|mass
breaks before we do this)bazel build //pkg/vere:test-fake-ship
seems to hang indefinitely (I ran it for ~16h on my own dedicated box and it still didn't finish)Tested working in all vanes I tested (Iris, etc. are a little more cumbersome):