qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance i


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement
Date: Mon, 27 Jul 2015 17:22:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1


On 27/07/2015 17:19, Pavel Fedin wrote:
>>> I'm just asking myself whether this is really necessary.  Is the 
>>> automagic [*] really needed in this case?
> In this particular case, perhaps, not. However, this automagic is
> used not only with GPIOs. It is used also with memory regions, as
> well as with some other places. Also, i thought that there could be
> some hard to notice problems, when, for example, we first add
> unnamed-gpio-in[0...1023], then add another 1024 pins, where count
> again goes from 0 to 1023. And we would get collision and failure,
> unless we know, that we already have 1024 objects with this name.

But IIUC qdev_init_gpio_in/out (the non-named variants) should only be
called once.  So if it breaks it's a feature.

Paolo

> So,
> just for better safety, i decided to fix the mechanism itself instead
> of changing use cases.



reply via email to

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