qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu and heavily increased RSS usage


From: Peter Lieven
Subject: Re: [Qemu-devel] Qemu and heavily increased RSS usage
Date: Thu, 23 Jun 2016 18:19:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Am 23.06.2016 um 17:47 schrieb Paolo Bonzini:

On 23/06/2016 17:31, Peter Lieven wrote:
Am 23.06.2016 um 17:21 schrieb Paolo Bonzini:
On 23/06/2016 16:58, Peter Lieven wrote:
commit ba3f4f64b0e941b9e03568b826746941bef071f9
Author: Paolo Bonzini <address@hidden>
Date:   Wed Jan 21 12:09:14 2015 +0100

      exec: RCUify AddressSpaceDispatch

      Note that even after this patch, most callers of address_space_*
      functions must still be under the big QEMU lock, otherwise the
memory
      region returned by address_space_translate can disappear as soon as
      address_space_translate returns.  This will be fixed in the next
part
      of this series.

      Reviewed-by: Fam Zheng <address@hidden>
      Signed-off-by: Paolo Bonzini <address@hidden>

@Paolo, @Fam, any idea?
When you use RCU, freeing stuff is delayed a bit.
define a bit?

I face the issue that it seems (some) stuff is actually never freed...
Can you confirm that with e.g. valgrind?  It could be that malloc has
asked the kernel for more RSS and never released that, but QEMU did free
the memory.

Valgrind does not see the increased RSS.

HEAD at 9d82b5a
(gdb) monitor leak_check summary any
==10988== LEAK SUMMARY:
==10988==    definitely lost: 392 bytes in 15 blocks
==10988==    indirectly lost: 3,824 bytes in 38 blocks
==10988==      possibly lost: 640 bytes in 2 blocks
==10988==    still reachable: 3,510,751 bytes in 8,898 blocks
==10988==         suppressed: 0 bytes in 0 blocks

HEAD at 79e2b9a
(gdb) monitor leak_check summary any
==8108== LEAK SUMMARY:
==8108==    definitely lost: 392 bytes in 15 blocks
==8108==    indirectly lost: 3,824 bytes in 38 blocks
==8108==      possibly lost: 640 bytes in 2 blocks
==8108==    still reachable: 3,510,975 bytes in 8,898 blocks
==8108==         suppressed: 0 bytes in 0 blocks

Mhh, so your idea could be right. But what to do now? The introduction of RCU 
obviously increases the short term RSS usage. But thats never corrected as
it seems.

I see this behaviour with kernel 3.19 and kernel 4.4

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]