-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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-rs: enable hugepage #5601
Conversation
Fixes:kata-containers#5242 Depends-on: github.com/kata-containers/kata-containers#5601 Signed-off-by: Zhongtao Hu <[email protected]>
84af78e
to
84c70ed
Compare
Fixes:kata-containers#5242 Depends-on: github.com/kata-containers/kata-containers#5601 Signed-off-by: Zhongtao Hu <[email protected]>
Fixes:kata-containers#5242 Depends-on: github.com/kata-containers/kata-containers#5601 Signed-off-by: Zhongtao Hu <[email protected]>
a35cab8
to
b48c557
Compare
b48c557
to
b882ffc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, but some parts need to be edited.
e7fae46
to
78b3178
Compare
1d13836
to
b85eb93
Compare
Fixes:kata-containers#5242 Depends-on: github.com/kata-containers/kata-containers#5601 Signed-off-by: Zhongtao Hu <[email protected]>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch contains 2 parts, I suggest splitting it into 2 commit
- VMM's
hugepage
. - container's
hugepage
.
src/runtime-rs/crates/runtimes/virt_container/src/container_manager/container.rs
Show resolved
Hide resolved
b85eb93
to
1368321
Compare
1368321
to
e055249
Compare
/test |
/test-arm |
e055249
to
68b015e
Compare
support vm hugepage,set the hugetlbfs mount point as vm memory path Fixes:kata-containers#5560 Signed-off-by: Zhongtao Hu <[email protected]>
68b015e
to
f49d83c
Compare
/test |
f49d83c
to
a107158
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tim-0731-Hzt Thanks, Zhongtao. A few comments.
} | ||
} | ||
|
||
pub(crate) fn get_huge_page_option(m: &oci::Mount) -> Result<Option<Vec<String>>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the hugetlbfs mount point is not mounted, will runtime help do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or do we assume that when users are using this feature, they have already set up the environment for hugetlbfs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we assume the users will set up the environment for hugetlbfs
. Because kubernetes
will be responsible to check the environment on the host. So, if it isn't mounted, it will fail in kubelet
.
impl Hugepage { | ||
pub(crate) fn new( | ||
mount: &oci::Mount, | ||
hugepage_limits_map: HashMap<Byte, u64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, why use Byte
here? I see in go version it is using str
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Byte
is more straightforward for page size
, compared with str
.
enable the functionality of using hugepages in container Fixes: kata-containers#5560 Signed-off-by: Zhongtao Hu <[email protected]>
a107158
to
afaf17f
Compare
/test |
/test-ubuntu |
add hugepage test Fixes:kata-containers#5242 Depends-on: github.com/kata-containers/kata-containers#5601 Signed-off-by: Zhongtao Hu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tim, some final reviews.
// /dev/hugepages will be the mount point | ||
// mkdir -p /dev/hugepages | ||
// mount -t hugetlbfs none /dev/hugepages | ||
const DEV_HUGEPAGES: &str = "/dev/hugepages"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You assume the mount point could only be /dev/hugepages
here. Could this be configurable?
Is this behaviour the same in Go runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can refer to this https://github.com/kata-containers/kata-containers/blob/main/src/runtime/pkg/govmm/qemu/qemu.go#L2848
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
This PR adds the http_proxy and https_proxy variables to the docker build arguments in order to avoid failures when building the images behind a proxy. Fixes kata-containers#5601 Signed-off-by: Gabriela Cervantes <[email protected]>
enable the functionality of using hugepages in container
Fixes: #5560
Signed-off-by: Zhongtao Hu [email protected]