From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsgN7-0001b9-Va for qemu-devel@nongnu.org; Wed, 01 Feb 2012 15:01:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsgN3-0008Jz-P0 for qemu-devel@nongnu.org; Wed, 01 Feb 2012 15:01:37 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsgN3-0008Js-Hc for qemu-devel@nongnu.org; Wed, 01 Feb 2012 15:01:33 -0500 Received: by pbaa11 with SMTP id a11so1767971pba.4 for ; Wed, 01 Feb 2012 12:01:32 -0800 (PST) Message-ID: <4F299A18.3000404@codemonkey.ws> Date: Wed, 01 Feb 2012 14:01:28 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1327957741-5842-1-git-send-email-aliguori@us.ibm.com> <1327957741-5842-17-git-send-email-aliguori@us.ibm.com> <4F279C73.1020909@redhat.com> In-Reply-To: <4F279C73.1020909@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 17/23] qom: move properties from qdev to object List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Anthony Liguori , Andreas Faerber , qemu-devel@nongnu.org On 01/31/2012 01:46 AM, Paolo Bonzini wrote: > On 01/30/2012 10:08 PM, Anthony Liguori wrote: >> This is mostly code movement although not entirely. This makes properties part >> of the Object base class which means that we can now start using Object in a >> meaningful way outside of qdev. > > Can we move them to an intermediate base class? I would like to use QOM > refcounting for other objects, such as SCSIRequest, so it is important to have > Object as a pretty light-weight class. Also (and perhaps more importantly), > interface implementations are Objects too and they do not need properties. > > I cannot think of any better name than IntrospectableObject, which is quite a > mouthful. I suppose that we could have the base class but still pass the objects > to the function as Object * and use the OBJECT macro. Nothing of this is in a > hot path anyway. I'm just not sure how I feel about this. The overhead of properties are small in terms of object size. It's just sizeof(void *). I think that read-only properties could be interesting for SCSIRequest. For instance, I can imagine having SCSIRequest is-a BlockRequest and having an error property associated with it. That would provide a nice way to have an info io operation that returned a list of failed I/O requests or something like that. Regards, Anthony Liguori > > Paolo >