[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
option for memory backed by hugepages?
- To: xen-users@xxxxxxxxxxxxxxxxxxxx
- From: John Wilkes <john@xxxxxxxxxx>
- Date: Thu, 14 Oct 2021 10:20:21 -0700
- Autocrypt: addr=john@xxxxxxxxxx; keydata= xsFNBFQ/5IsBEADCIeAJbDETgmrrQOEdRRngd1lcchWtqGKI+qAuEDFH2vcDWbCJeQyasRAx CWbwd/R96ZyugbK8P8vqVFX2/j9wItHNtni0xfikqvBWhbNqTL7VE3jh4NBSJhPJZPUm5/ZI +JUXIafOw3AtHzkzi1g02t63L8ZlJbXuZP19S8ntPiDFOLWyD6jnE5mcrPkLyVmmwHf0OnHO eLDTgVqZhCvd6E2nlwW3DhNWchvdjpt6FfZj0a3RizwZqbZjOjGPCLNca2IXKFl8yhvJzRBR dkFqMtxKVqGUGEX21hzbkiYaHMVtcKSRCWq0t54BZI0vY87LVV6xtgC+2UfcWvH8jN3igVzI Yh4UH8w7EuCMpD2g2pHU4AM7QUS5XFpPXwHk/97DQOuaGKXQpvYalE52n0XGHCWuwfNf/iJ9 pJ28fAsmVbr78P3fyjvW0J5PjCZtloaUH4BDXCFKFtRnNc+XG1kP3Ub5GXx/Uks/WYjlSJtU YQi7Qzhe7h66mPeCwsUvrilfOtTX7f7dap7tqtOUrHr1TDZNHaz/Pye6ZM65sSnqrXQk81sm 1pxbDDn1kbK3B/JLNthqQiVUmeuNXtgKhuQTRx9jVg7MVrvrNS6iVVcfuFNFdqvLhYdXKWZ1 W49e5Z7JQMmFyMIZqEV+TLFYh4UxVpy4AIhV0ZBFp3Y58GmbNwARAQABzR1Kb2huIFdpbGtl cyA8am9obkB3aWxrZXMuY29tPsLBdwQTAQoAIQIbAwULCQgHAwUVCgkICwUWAgMBAAIeAQIX gAUCX3db9AAKCRBmMvbqwgnCFvLYD/92yfxd4dIeXhAQnc7rSnl8lZwNA6huZFqvO3r+NNYW cjreVl6SR0J2Xi8tNbx2VeChoPCmKu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znXUjqK0Z88xG4XL6TAqo6GfeEK0UTUeNXKzMCTUbU09EwvTFmUUj GkG58wN2bGqZYvu29wPz/w5SnjpmqRihgiv3asCNLxUZhcpnX7aSGEfKrO/ZnFlm4zFWxjc0 dInKC6jc+fDmfvifLhKqh0OV5q4VYcnDHHgn3RPHrQxKG2QD2ZHyuDuSDYBNC0tnPCUiO1Za 74jTNyRKYwMVLRbnjZpLbzH+nm9YbifJabL4EfqjafcAEQEAAcLBXwQYAQoACQIbDAUCX3db 9gAKCRBmMvbqwgnCFuRPD/9W9e9BGt0XSb5mbWaNQRiBq/Kr/ISvNSPvRIrsf/RPYUFm/R3J 8df+h5Q54lnRx6RzrK+9n2j78jURtKPnmPEtu8fiXm7NblheAyaE6PTryfaJSqwx0XZGth3g BgLzvTt9UDghsmpUeFCgBtT6oKEbJ7eOwSCKPu9S0dpkhR00BuxlXRiZjxSCw5FAh04hwLS0 q+W4aRoL67SNfrXXK5/JSTZW++IhdTvNGYz8nPtOZIeyBO0v7Z7JtMSxIVMA+Qt57Udt9Or6 a4XhDux9gEMKbor8NMxQIXOsFvlFobBd9VHxX+gRYfu7ErjjVmz2zOCNqWFamL+Q9T8PXqKh LOkinUwQGn7r8gEethv7H7RzOCaK357pXOALDhJrMaQFruUWHY4yW5Ok95zhqmfMSYcbxfCe 9pKlYsfUazrJ5g7MQnCMj1j4eNJjOPkEhmRUQNTO/y1An5oBAvTmC+ubCudJImFouRanqj5a VTqChSj8f38d/rO3/emrembyb9ntX4pgdDhS4dOXN2CN/FHD8ARd7pIEjVE2/9lVs2aOQeeJ UM0VeFijgTylTvaJQvq/gjphdc9ioJivfO04n3JNtTSi9fcw2kJirFgSNtS4ryXQ8D6h3R9O +/tU76sTgTOySZuA/mHx2p7RW9ihwNhFcimfHl8o+Z7Cy6l71fdPUBU5xA==
- Delivery-date: Thu, 14 Oct 2021 18:37:42 +0000
- List-id: Xen user discussion <xen-users.lists.xenproject.org>
I need to guarantee that allocating 2MB using mmap() with the
MAP_HUGETLB flag on a HVM will get a contiguous 2MB huge page in
system memory. HAP is enabled. This is for some specialized
hardware that requires 2MB of contiguous DRAM, and it will not
function properly if the allocated memory uses 4KB pages that
appear contiguous in virtual space but are not physically
contiguous in system DRAM.
It functions correctly running in a non-virtualized host
environment if a sufficient number of huge pages is reserved in
/proc/sys/vm/nr_hugepages.
There is a qemu configuration option for guest memory to be
backed by huge pages:
<memoryBacking>
<hugepages/>
</memoryBacking>
I have confirmed that contiguous 2MB pages are allocated in
system physical memory with mmap() and MAP_HUGETLB on a guest VM
if the qemu guest's memory is configured to be backed by
hugepages.
Is there a similar mechanism in Xen that will guarantee that a
HVM will get a contiguous 2MB huge page in system DRAM?
John
|