Skip to content

QOM: object_property_add() performance improvement

Pavel Fedin qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 14 repliesIn review
  2. v31 patch 5 repliesSuperseded
  3. v21 patch 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2QOM: Introduce object_property_add_single()qom/object.c+40 -270 replies
2/2QOM: object_property_add() performance improvementqom/object.c+40 -1113 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPeter Crosthwaite
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement

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(-)
Signature · 1 line
1.9.5.msysgit.0