On Tue, Jul 23, 2013 at 8:31 AM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: > On Tue, Jul 23, 2013 at 2:07 PM, Rob Clark <robdclark@xxxxxxxxx> wrote: >> On Tue, Jul 16, 2013 at 3:11 AM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: >>> Only one callsite and since ->handle_count is not a simple reference >>> count (it can resurrect) it's imo better to be explicit about things >>> than hide the refcount dance. >> >> I'm not really sure I like this one.. I guess it could be that I'm >> just used to the handle-ref stuff, so it doesn't seem odd not-inlined. >> And it does seem kinda odd / unsymmetric to have an unref w/out a >> ref. I guess I kinda like the bikeshed's current color in this case. > > I generally agree but in this case a follow-up patch ("drm/gem: fix up > flink name create race") will change obj->handle_count from an > atomic_t to a normal int protected by the dev->object_name_lock > spinlock. To avoid races we need to hold that spinlock over a few > different instructions, so with the refcounting dance inlined it's > much more obvious that that obj->handle_count is always correctly > protected imo. hmm, ok.. then I'll reserve judgment until I get further through the series ;-) if you do spin another version of the series, it could be worth mentioning this in the commit msg BR, -R > -Daniel > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel