qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qom: object_property_add() performance impro


From: Pavel Fedin
Subject: Re: [Qemu-devel] [PATCH v2] qom: object_property_add() performance improvement
Date: Mon, 15 Jun 2015 10:00:29 +0300

 Hello!

> 10 secs is still pretty brutal for machine init. Got any clues for
> where the rest of the time is going?

 Every property_add_XXX() verifies that there are no duplicates. With this 
number of CPUs we still have thousands of properties on GIC object, so every 
new property still once walks through everything we already have. Hence the bad 
performance, because properties are just a linked list. I think that another, 
quick-walk-through structure should be used for storing properties, like binary 
tree. Most of the time we are looking up properties by a given name.
 I wonder, do we already have some tree functions in QOM?

> Just define it as a uintptr_t to avoid the casts.

 I wanted to, but in this case:
a) I have to significantly enlarge space for string because maximum possible 
value would be 64-bit (1.8E+19 = 20 characters?).
b) Cast once to int when giving to g_sprintf(), to avoid this

 What is better? 

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia





reply via email to

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