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

One-shot purge of dirty blocks per region. #358

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsm9000
Copy link
Contributor

@dsm9000 dsm9000 commented Jan 18, 2024

Start of yet another attempt at #270 .

Proposed purgeDirtyBlocks(uint blocks) purges currently-dirtiest region, wholesale, until at least blocks count of dirty blocks have been purged, or there are none remaining to purge. The actual count of purged dirty blocks (which may exceed the requested count) is returned.

Needs:

  • Test
  • Discussion of whether this is in fact a good idea (per my current reading of the pertinent kernel src, madvise on already-clean space appears to have negligible cost; hence this proposed optimization.)
  • Should probably MADV_FREE rather than MADV_DONTNEED if we go with this?

@dsm9000 dsm9000 force-pushed the release_dirty_blocks_oneshot branch from e8a24c1 to 0df5aeb Compare January 18, 2024 04:45
@dsm9000 dsm9000 marked this pull request as draft January 18, 2024 14:51
@deadalnix deadalnix force-pushed the master branch 2 times, most recently from 4acd1ab to e854d3d Compare June 17, 2024 21:01
@deadalnix deadalnix force-pushed the master branch 3 times, most recently from 0896895 to 5a79292 Compare October 13, 2024 11:52
@deadalnix deadalnix force-pushed the master branch 3 times, most recently from 7ce40a5 to 4dbe602 Compare December 4, 2024 01:18
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.

None yet

1 participant