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

Remove revert_to_private_mode() member which would require MAP_FIXED to work reliably. #26

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Oct 26, 2023

The reason I initially added this revert_to_private_mode() (so we'd load a snapshot in mapped mode, and revert to mapped_private mode after the snapshot is loaded), was that I hoped that we would only touch a few pages in normal mapped_private functioning.

The snapshot loading seemed a bad case where all state db pages containing data would be touched.

However, even in normal syncing, most of the pages are dirty after a few minutes, so the remap optimization is not worth it I believe.

In addition, to work correctly, it would require use the linux specific mmap(...MAP_FIXED) api instead of the portable boost interprocess mmap interface.

This PR is just unused code removal.

@greg7mdp greg7mdp merged commit 7615dda into main Oct 26, 2023
2 checks passed
@greg7mdp greg7mdp deleted the gh_1764 branch October 26, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants