Re: [Qemu-devel] [RFC 5/8] qom/object: update class cache atomically

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 16:59, Alex Bennée wrote: > > Looks fine to me, would be nicer to have an idea of the performance hit, > > but I suppose it is marginal. > > I was surprised that CONFIG_QOM_CAST_DEBUG is the default because it > does a bunch of stuff on every cast. The other option of course would

Re: [Qemu-devel] [RFC 5/8] qom/object: update class cache atomically

2016-09-20 Thread Alex Bennée
Marc-André Lureau writes: > Hi > > On Mon, Sep 19, 2016 at 7:54 PM Alex Bennée wrote: > >> The idiom CPU_GET_CLASS(cpu) is fairly extensively used in various >> threads and trips of ThreadSanitizer due to the fact it updates >>

Re: [Qemu-devel] [RFC 5/8] qom/object: update class cache atomically

2016-09-20 Thread Marc-André Lureau
Hi On Mon, Sep 19, 2016 at 7:54 PM Alex Bennée wrote: > The idiom CPU_GET_CLASS(cpu) is fairly extensively used in various > threads and trips of ThreadSanitizer due to the fact it updates > obj->class->object_cast_cache behind the scenes. As this is just a > fast-path