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

Cap compaction_readahead_size by max_sectors_kb #12937

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hx235
Copy link
Contributor

@hx235 hx235 commented Aug 15, 2024

Context/Summary:
#12038 reported a regression where compaction read ahead does not work when compaction_readahead_size is greater than max_sectors_kb defined in linux (i.e, largest I/O size that the OS issues to a block device, see https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt for more).

This PR fixes it by capping the compaction_readahead_size by max_sectors_kb if any. A refactoring of reading queue sys file is also included to reuse existing code.

Test:
#12038 (comment) verified the regression was fixed

@hx235 hx235 changed the title Cap compaction_readahead_size by max_sectors_kb [TestOnly] Cap compaction_readahead_size by max_sectors_kb Aug 15, 2024
@hx235 hx235 added the WIP Work in progress label Aug 15, 2024
@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@hx235 hx235 changed the title [TestOnly] Cap compaction_readahead_size by max_sectors_kb Cap compaction_readahead_size by max_sectors_kb Sep 18, 2024
@hx235 hx235 removed the WIP Work in progress label Sep 27, 2024
@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@hx235
Copy link
Contributor Author

hx235 commented Oct 8, 2024

Rebase

@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@hx235 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants