[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc() |
Date: |
Wed, 12 Oct 2011 22:47:14 +0200 |
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 less useful, as code
>> isn't directly executed from there and we the rest of the overhead is a lot
>> higher either way (especially the softmmu one).
>> Either way, why does valgrind break when we enforce big alignment? That
>> really sounds more like a valgrind bug than anything else. Memalign is there
>> for exactly that reason, no?
>>
>>
>> Alex
>
> Actually, there is even a difference between KVM (x86_64) and KVM (non x86_64)
> in the current code: only x86_64 hosts use the 2 MiB alignment.
Right. It might make sense to find a reasonable alignment for all archs and
just set it to that. I vote for 16MB :).
> Valgrind breaks because it has an assertion which limits the alignment.
> This limitation was already discussed in 2008 and still exists in latest
> Ubuntu and other distributions (and also in latest Valgrind SVN trunk).
>
> Therefore I don't expect that it will be fixed soon.
>
> See these bug reports, for example:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489297
> http://bugs.kde.org/show_bug.cgi?id=203877
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
Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc(), Avi Kivity, 2011/10/16