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

runtime: Set memory config shared=false when shared_fs=None in CLH #265

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

Sumynwa
Copy link

@Sumynwa Sumynwa commented Dec 10, 2024

Merge Checklist
  • Followed patch format from upstream recommendation: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#patch-format
    • Included a single commit in a given PR - at least unless there are related commits and each makes sense as a change on its own.
  • Aware about the PR to be merged using "create a merge commit" rather than "squash and merge" (or similar)
  • The upstream/missing label (or upstream/not-needed) has been set on the PR.
Summary

The commit cherry picks upstream changes merged in PR 10548.

Test Methodology

@Sumynwa Sumynwa requested review from a team as code owners December 10, 2024 09:01
@Sumynwa Sumynwa added the upstream/merged PRs that have been merged upstream label Dec 10, 2024
@Sumynwa Sumynwa force-pushed the sumsharma/upstr-clh-memory-shared branch from 18d1d64 to 72dfde2 Compare December 10, 2024 19:24
src/runtime/virtcontainers/clh.go Outdated Show resolved Hide resolved
This commit sets memory config `shared` to false in cloud hypervisor when creating
vm with shared_fs=None && hugePages = false.

Currently in runtime/virtcontainers/clh.go,the memory config shared is by default set to true.
As per the CLH memory document,
(a) shared=true is needed in case like when using virtio_fs since virtiofs daemon runs as separate process than clh.
(b) for shared_fs=none + hugespages=false, shared=false can be set to use private anonymous memory for guest (with no file backing).
(c) Another memory config thp (use transparent huge pages) is always enabled by default.
As per documentation, (b) + (c) can be used in combination.
However, with the current CLH implementation, the above combination cannot be used since shared=true is always set.

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
@Sumynwa Sumynwa force-pushed the sumsharma/upstr-clh-memory-shared branch from 72dfde2 to 9224163 Compare December 11, 2024 05:24
@Sumynwa Sumynwa merged commit 7e24498 into msft-main Dec 12, 2024
46 of 55 checks passed
@Sumynwa Sumynwa deleted the sumsharma/upstr-clh-memory-shared branch December 12, 2024 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream/merged PRs that have been merged upstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants