Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, data allocations from the cap device are data block aligned. Metadata allocations, however, are not. This can lead to data allocations after a metadata allocation to become unaligned as well. This has performance implications. This commit addresses this in a backwards compatiable way by using our previous metadata size calculation but rounds the total desired metadata device size up to the nearest data block size multiple. This has a few very desirable properties: 1. The metadata allocations will always be aligned to the data block size boundary. 2. The metadata allocations may appear a bit larger, but the overall growth of the step function tracks the linear growth of the original metadata space calculation function. 3. While this commit does not resolve alignment issues for pools that have already bumped into this problem, this code should theoretically cause future allocations on affected pools to be in alignment, minimizing performance impact for future allocations on affected pools.
- Loading branch information