qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement
@ 2015-07-14  9:38 Pavel Fedin
  2015-07-14  9:39 ` [Qemu-devel] [PATCH v4 1/2] QOM: Introduce object_property_add_single() Pavel Fedin
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Pavel Fedin @ 2015-07-14  9:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Crosthwaite, Andreas Färber

The function originally behaves very badly when adding properties with "[*]"
suffix. Normally these are used for numbering IRQ pins. In order to find the
correct starting number the function started from zero and checked for
duplicates. This takes incredibly long time with large number of CPUs because
number of IRQ pins on some architectures (like ARM GICv3) gets multiplied by
number of CPUs.

The solution is to add one more property which caches last used index so that
duplication check is not repeated thousands of times. Every time an array is
expanded the index is picked up from this cache.

The modification decreases qemu startup time with 32 CPUs by a factor of 2
(~10 sec vs ~20 sec).

Pavel Fedin (2):
  QOM: Introduce object_property_add_single()
  QOM: object_property_add() performance improvement

 qom/object.c | 96 +++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 69 insertions(+), 27 deletions(-)

-- 
1.9.5.msysgit.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-07-28  7:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14  9:38 [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement Pavel Fedin
2015-07-14  9:39 ` [Qemu-devel] [PATCH v4 1/2] QOM: Introduce object_property_add_single() Pavel Fedin
2015-07-14  9:39 ` [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement Pavel Fedin
2015-07-27 11:42   ` Daniel P. Berrange
2015-07-27 14:36     ` Pavel Fedin
2015-07-27 13:03   ` Markus Armbruster
2015-07-27 13:23     ` Daniel P. Berrange
2015-07-27 13:46       ` Paolo Bonzini
2015-07-27 14:36     ` Pavel Fedin
2015-07-27 14:57       ` Andreas Färber
2015-07-27 15:06         ` Paolo Bonzini
2015-07-27 15:09           ` Paolo Bonzini
2015-07-27 15:19           ` Pavel Fedin
2015-07-27 15:22             ` Paolo Bonzini
2015-07-28  6:45               ` Pavel Fedin
2015-07-28  7:06                 ` Paolo Bonzini
2015-07-27 11:19 ` [Qemu-devel] [PATCH v4 0/2] " Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).