Received: from eggs.gnu.org ([2001:4830:134:3::10]:39794)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1Z4ONs-0006pC-Ms
for qemu-devel@nongnu.org; Mon, 15 Jun 2015 03:00:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1Z4ONm-0006iK-TT
for qemu-devel@nongnu.org; Mon, 15 Jun 2015 03:00:40 -0400
Received: from mailout1.w1.samsung.com ([210.118.77.11]:58022)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Z4ONm-0006ha-Ns
for qemu-devel@nongnu.org; Mon, 15 Jun 2015 03:00:34 -0400
Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245])
by mailout1.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NPZ00E3F4SUIE10@mailout1.w1.samsung.com> for
qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:30 +0100 (BST)
From: Pavel Fedin
References: <03e601d0a352$384f9610$a8eec230$@samsung.com>
In-reply-to:
Date: Mon, 15 Jun 2015 10:00:29 +0300
Message-id: <037901d0a738$f747a820$e5d6f860$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: quoted-printable
Content-language: ru
Subject: Re: [Qemu-devel] [PATCH v2] qom: object_property_add()
performance improvement
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: 'Peter Crosthwaite'
Cc: 'QEMU Developers' , =?UTF-8?Q?'Andreas_F=C3=A4rber'?=
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 =3D 20 characters?).
b) Cast once to int when giving to g_sprintf(), to avoid this
What is better?=20
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia