Open
Conversation
Adds an accompanying option to set a data preallocation minimum threshold value. The value can be set through sysfs or at mount time. data_prealloc_blocks_min cannot be larger than data_prealloc_blocks, and this is enforced. This should be fine for all common use cases where the _min option is expected to be less than 2048, the default of data_prealloc_blocks. Extra test cases are added to validate bad mount option values and sysfs value writes. As well as tests that validate that the minimum threshold is set and honored as expected. Preallocation scales with scoutfs_get_inode_onoff() online values, so that new extents double the online size every allocation until it reaches data_prealloc_blocks. The _onoff() value is only fetched once if possible. Signed-off-by: Auke Kok <auke.kok@versity.com>
Collaborator
|
I guess my question here is why we need the mount option. Instead of ramping up in powers of two to the min, it'll allocate single blocks. 2047 extents vs 11 extents seems like a pretty exciting difference. Why not always ramp up based on whatever combination of online blocks and file size gets whatever behaviour we're after? |
Contributor
Author
|
That's a good point, and, it will hugely simplify this patch. The ramping up by itself should already do exactly what we'd want. |
This file contains hidden or 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
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.
Adds an accompanying option to set a data preallocation minimum threshold value. The value can be set through sysfs or at mount time.
data_prealloc_blocks_min cannot be larger than data_prealloc_blocks, and this is enforced. This should be fine for all common use cases where the _min option is expected to be less than 2048, the default of data_prealloc_blocks.
Extra test cases are added to validate bad mount option values and sysfs value writes. As well as tests that validate that the minimum threshold is set and honored as expected.
Preallocation scales with scoutfs_get_inode_onoff() online values, so that new extents double the online size every allocation until it reaches data_prealloc_blocks. The _onoff() value is only fetched once if possible.