[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor |
Date: |
Mon, 4 Jul 2016 13:42:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 04/07/2016 13:18, Markus Armbruster wrote:
> Paolo Bonzini <address@hidden> writes:
>
>> On 30/06/2016 16:12, Markus Armbruster wrote:
>>> Implementing a stack as "big enough" array can be wasteful.
>>> Implementing it as dynamically allocated list is differently wasteful.
>>> Saving several mallocs and frees can be worth "wasting" a few pages of
>>> memory for a short time.
>>
>> Most usage of QmpInputVisitor at startup comes from
>> object_property_set_qobject, which only sets small scalar objects. The
>> stack is entirely unused in this case.
>
> A quick test run shows ~300 qmp_input_visitor_new() calls during
> startup, with at most two alive at the same time.
>
> Why would it matter whether these are in the order of 150 bytes or 25000
> bytes each? How could this materially impact RSS?
I think we agree that it doesn't. The question in the subthread is
whether we can improve QmpInputVisitor in general.
Paolo