Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-16 Thread Avi Kivity
On 10/12/2011 10:02 PM, Alexander Graf wrote: On 12.10.2011, at 20:05, Stefan Weil wrote: Hello Avi, commit 36b58628 increased the alignment for some large memory blocks (typically the system RAM) to 2 MiB (QEMU_VMALLOC_ALIGN) on x86_64 Linux hosts. As far as I know, this was

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-13 Thread Gerd Hoffmann
Hi, I can try to make QEMU more useable with Valgrind by changing the QEMU code (which was Valgrind compatible up to Avi's change). Is there some way for apps to figure they are running in valgrind? Then we could choose a different alignment automagically. Who aborts btw? Is this valgrind

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 09:56 AM, Gerd Hoffmann wrote: Is there some way for apps to figure they are running in valgrind? Then we could choose a different alignment automagically. Yes, valgrind.h (on RH distros that's in package valgrind-devel; there is a valgrind.pc file to add the correct include

[Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Stefan Weil
Hello Avi, commit 36b58628 increased the alignment for some large memory blocks (typically the system RAM) to 2 MiB (QEMU_VMALLOC_ALIGN) on x86_64 Linux hosts. As far as I know, this was only required for KVM. There is a bad side effect of this increase: the Valgrind tool only supports an

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Alexander Graf
On 12.10.2011, at 20:05, Stefan Weil wrote: Hello Avi, commit 36b58628 increased the alignment for some large memory blocks (typically the system RAM) to 2 MiB (QEMU_VMALLOC_ALIGN) on x86_64 Linux hosts. As far as I know, this was only required for KVM. There is a bad side effect of

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Stefan Weil
Am 12.10.2011 22:02, schrieb Alexander Graf: Actually, I'd much rather prefer to keep the differences between KVM and non-KVM low here. THP can potentially also work on TCG, so the alignment isn't completely moot here. Though it's certainly a lot less useful, as code isn't directly executed

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Alexander Graf
On 12.10.2011, at 22:41, Stefan Weil wrote: Am 12.10.2011 22:02, schrieb Alexander Graf: Actually, I'd much rather prefer to keep the differences between KVM and non-KVM low here. THP can potentially also work on TCG, so the alignment isn't completely moot here. Though it's certainly a lot

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Stefan Weil
Am 12.10.2011 22:47, schrieb Alexander Graf: Well, yes, my point is that it's a bug in valgrind that should be fixed. I don't think we should special-case QEMU because of bugs in debugging software :) Alex Yes, the valgrind bug should be fixed. I don't know why it isn't, but that's not the

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-12 Thread Alexander Graf
On 12.10.2011, at 23:19, Stefan Weil wrote: Am 12.10.2011 22:47, schrieb Alexander Graf: Well, yes, my point is that it's a bug in valgrind that should be fixed. I don't think we should special-case QEMU because of bugs in debugging software :) Alex Yes, the valgrind bug should be