-
Notifications
You must be signed in to change notification settings - Fork 103
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
Support MmapRegion with huge pages #118
Comments
Hi! Just to add a bit more context, |
Hi! @doracgp and I are students at the University of Texas at Austin, and we are interested in virtualization and hypervisor technology. We'd like to tackle this issue. Can it be assigned to us? To be sure, what does this issue entail, beyond presenting a clear interface to request huge pages, backed by these low level functions as @alexandruag describes? We are also interested in using such a new API downstream in firecracker-microvm/firecracker#2139. |
You'd want to use |
There's no perfect solution for huge page yet, both hugetlbfs and memfd have limitations. According to our experience, memfd is preferred. |
Is the intention here fully encapsulate the use of memfd and present an "anonymous huge-page-backed" (and maybe also "file huge-page-backed"?) constructor for As far as alignment requirements, are those the responsibility of the VMM, or of this crate? I'm not seeing eager checks on |
@jiangliu According to this article, it seems memfd_create makes use of hugetlbfs regardless of whether there was a prior, explicit mount. Could you elaborate on what you meant by limitations for each of them? |
Maybe the two issues can be combined (this one and #113 ), so that once configurable, users can choose to either use transparent huge pages, or actual huge pages as a configuration option. That would allow users to either pick the very simple transparent variant, or the more sophisticated, and controlled variant. Thoughts are welcome! |
And there‘s another related PR: #120 |
I think #120 looks similar to what we'd want to implement here, albeit with stronger coupling between the region's backing behavior and the values of "labels" on the region. I'm envisioning a configuration option when creating a region that includes multiple options, such as (1) standard base pages, (2) transparent hugepages via Then, a similar getter to the idea proposed in #120 can be used to query a region for the behavior it was configured with. Thus, VMMs can take advantage of this information (as in cloud-hypervisor/cloud-hypervisor#1909), and also have control over these features when allocating memory regions (via the configuration option). Thoughts? |
We are creating the memfd/hugetlbfsfd by the vmm, and it's reasonable to move this into the vm-memory if it's common:)
Yes, we should combine these two PRs. One questions is how to make the API platform independent.
|
Feature request
Add support for huge pages guest memory. For a specific use case, please consult this issue.
The text was updated successfully, but these errors were encountered: