Re: [PATCH v2] Improve on virAtomic implementation

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

 



On Tue, Apr 24, 2012 at 10:09:10AM -0400, Stefan Berger wrote:
> On 04/20/2012 11:56 AM, Laine Stump wrote:
> >On 04/20/2012 06:44 AM, Stefan Berger wrote:
> >>This patch improves the previously added virAtomicInt implementation
> >>by using gcc-builtins if possible. The needed builtins are available
> >>since GCC>= 4.1. At least the 4.0 docs don't mention them.
> >>
> >>---
> >>  src/util/viratomic.h |   95
> >>++++++++++++++++++++++++++++++++++++++++++---------
> >>  1 file changed, 79 insertions(+), 16 deletions(-)
> >ACK.
> >
> >Now we can start thinking about eliminating locking for things that just
> >need a refcount :-)
> Of which there aren't too many yet... I'll push this one later
> today. Thanks.

We can't eliminate locking for the objects in general, but we can
eliminate locking in places where we only touch the ref-count, while
keeping the locks for aall other API calls on the object. This
would make like easier for us in a number of places, by avoiding
potential lock aqcuisition order inversion problems we've hit in
the past - particularly in the async callbacks/event dispatch

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]