-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prototype: change credit scaling, using nominal vs physical credit
Previously we've had a somewhat complex method to scale credits from those supplied in a level (1 per update) to the credits used in merging. The existing scheme has a number of downsides: * no clear distinction between scaled and unscaled credits, what does each one measure? * complex, needs scaling dependent of the merge-policy * always uses worst case supply of credits so often finishes early * rounding errors compound problem of credit over-supply * no satisfactory way to check we do not over-supply credits * contributing credits to a merge from multiple handles will cause the merge to finish earlier than any of the handles needs it to finish, thus doing work more eagerly than necessary. The new scheme involves: * distinguishing physical vs nominal credits, with a clear definition for each measure * converting between nominal and physical without merge policy * physical debt is no longer worst case but matches actual cost * integer rounding errors do not compound * we can assert that we reach the nominal and physical debt totals at the same moment (when the merge is done) and thus we can assert no over-supply of physical credits. * we can avoid supplying credits too quickly to a merge that is shared between multiple handles, each one only pushes it as far as it needs.
- Loading branch information
Showing
2 changed files
with
123 additions
and
67 deletions.
There are no files selected for viewing
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
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