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

Fix memory resize failure due to not aligned to 256M #807

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

zhshuj
Copy link
Contributor

@zhshuj zhshuj commented Feb 29, 2024

Current code caculates an active VM's memory with the Total online memory value of lsmem command output when doing live resize.

This value is in Gigabytes, and is not precise to 2 digits, for example, lsmem should be reporting 2.75G, but instead it reports 2.8G; when target memory is 4G, then the to-be-increased memory is caculated to 1.2G, which is not aligned to 256M, then causes resize to fail.

To fix this problem, change to use the lsmem -b output, as it is in Bytes, so it is precise value, and always be aligned to 256M.

Current code caculates an active VM's memory with the
Total online memory value of `lsmem` command output when
doing live resize.

This value is in Gigabytes, and is not precise to 2 digits,
for example, lsmem should be reporting 2.75G, but instead
it reports 2.8G; when target memory is 4G, then the
to-be-increased memory is caculated to 1.2G, which is not
aligned to 256M, then causes resize to fail.

To fix this problem, change to use the `lsmem -b` output, as
it is in Bytes, so it is precise value, and always be aligned
to 256M.

Signed-off-by: Shu Juan Zhang <[email protected]>
@zhshuj
Copy link
Contributor Author

zhshuj commented Feb 29, 2024

@jichenjc @bjhuangr @haoxy000 @SeanHQF can you help review?

@jichenjc
Copy link
Collaborator

jichenjc commented Mar 1, 2024

/lgtm

@jichenjc jichenjc merged commit 8647816 into openmainframeproject:master Mar 1, 2024
2 checks passed
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.

4 participants