Re: Alignment issue with transparent huge pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/2012 03:43 AM, Christoffer Dall wrote:
> Hi,
> 
> I am seeing an interesting case on KVM/ARM where a user memory region
> is not aligned with the guest physical memory address with respect to
> huge page size. This clearly makes it impossible for us to leverage
> transparent huge pages for stage-2 mappings on ARM.
> 
> The question is, if this is simply something to check for inside KVM
> and hope that user space aligns its memory allocations, or if this is
> supposed to be forced somehow, or if I'm missing a bigger picture all
> together?

A #ifdef needs changing:

#if defined(__linux__) && defined(__x86_64__)
   /* Use 2 MiB alignment so transparent hugepages can be used by KVM.
      Valgrind does not support alignments larger than 1 MiB,
      therefore we need special code which handles running on Valgrind. */
#  define QEMU_VMALLOC_ALIGN (512 * 4096)
#  define CONFIG_VALGRIND
#elif defined(__linux__) && defined(__s390x__)
   /* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */
#  define QEMU_VMALLOC_ALIGN (256 * 4096)
#else
#  define QEMU_VMALLOC_ALIGN getpagesize()
#endif



-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux