Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

runtime: Fix hugepages support #3109

Merged
merged 2 commits into from
Apr 22, 2021
Merged

Conversation

bpradipt
Copy link
Contributor

Fixes: #2353

Signed-off-by: Pradipta Banerjee pradipta.banerjee@gmail.com

@bpradipt
Copy link
Contributor Author

Sending this to kick start discussion on how to support hugepage for containers with Kata.
A google document explaining the details can be accessed from the following link - https://docs.google.com/document/d/1Oo_B2RjkI6pm1Sd8PXL6CzwPv9u0WL-RP6G2-k5__mw/edit

cc @amshinde @fidencio @dgibson @c3d

@bpradipt
Copy link
Contributor Author

Related agent side code - kata-containers/agent#872

virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/sandbox.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/sandbox.go Outdated Show resolved Hide resolved
@bpradipt
Copy link
Contributor Author

bpradipt commented Jan 8, 2021

closing and re-opening to check if CI works

@bpradipt bpradipt closed this Jan 8, 2021
@bpradipt bpradipt reopened this Jan 8, 2021
@bpradipt
Copy link
Contributor Author

bpradipt commented Jan 8, 2021

/test-ubuntu

@bpradipt
Copy link
Contributor Author

bpradipt commented Jan 8, 2021

/test-ubuntu

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #3109 (b486387) into master (2a98f43) will decrease coverage by 0.04%.
The diff coverage is 66.03%.

@@            Coverage Diff             @@
##           master    #3109      +/-   ##
==========================================
- Coverage   50.35%   50.30%   -0.05%     
==========================================
  Files         120      120              
  Lines       15918    16045     +127     
==========================================
+ Hits         8016     8072      +56     
- Misses       6812     6881      +69     
- Partials     1090     1092       +2     

@bpradipt
Copy link
Contributor Author

bpradipt commented Jan 8, 2021

/test-vfio

Copy link
Member

@egernst egernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions below, but stepping back I'm wondering how this will work in Kubernetes. To actually provide huge pages, we want to volume to be backed by huge pages from the host itself. To facilitate that, AFAICT we'd want the entire VM to be backed by huge pages?

Assuming that.... huge pages are a finite resource, and is tracked by kubelet and the Kube-scheduler. If we back the entire VM in huge pages, we are using a lot more than just what was requested in the pod spec? Worse, I would think we should be killed, since we are bound by the pod's hugetlb cgroup, right?

I'd like to be able to properly support huge pages, but I'm not sure we can do it just in the runtime.

virtcontainers/sandbox.go Show resolved Hide resolved
virtcontainers/sandbox.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/sandbox.go Outdated Show resolved Hide resolved
@bpradipt
Copy link
Contributor Author

/test-ubuntu

@bpradipt
Copy link
Contributor Author

/test-ubuntu

virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/utils/utils_linux_test.go Outdated Show resolved Hide resolved
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
@bpradipt bpradipt changed the title [WIP] runtime: Fix hugepages support runtime: Fix hugepages support Feb 2, 2021
@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 2, 2021

/test-ubuntu

@bpradipt bpradipt closed this Feb 2, 2021
@bpradipt bpradipt reopened this Feb 2, 2021
@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 2, 2021

/test-ubuntu

@bpradipt bpradipt added the needs-forward-port Changes need to be applied to a newer branch / repository label Feb 2, 2021
Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bpradipt. A few comments.

virtcontainers/kata_agent.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent_test.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent_test.go Show resolved Hide resolved
virtcontainers/kata_agent_test.go Outdated Show resolved Hide resolved
virtcontainers/kata_agent_test.go Outdated Show resolved Hide resolved
virtcontainers/utils/utils_linux_test.go Outdated Show resolved Hide resolved
@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 2, 2021

/test-ubuntu

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bpradipt.

lgtm

@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 3, 2021

/test-ubuntu-vfio

@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 3, 2021

/test-vfio

Copy link
Contributor

@dgibson dgibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, excepting one nit which I've commented.

virtcontainers/utils/utils_linux_test.go Outdated Show resolved Hide resolved
virtcontainers/sandbox_test.go Show resolved Hide resolved
Fixes: kata-containers#2353

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 3, 2021

/test-ubuntu

@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 3, 2021

/test-vfio

@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 3, 2021

/test-ubuntu

1 similar comment
@bpradipt
Copy link
Contributor Author

bpradipt commented Feb 4, 2021

/test-ubuntu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-forward-port Changes need to be applied to a newer branch / repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hugepage usage with kubernetes and kata-container
5 participants