On Wed, Jul 24, 2013 at 2:00 AM, Dave Airlie <airlied@xxxxxxxxx> wrote: > On Tue, Jul 23, 2013 at 10:43 PM, Rob Clark <robdclark@xxxxxxxxx> wrote: >> 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 >> > > Just merge this into that series or patch, > > deinlining it now it just noise. Yeah, I'll do so. I've started with a few refactoring patches to get a clearer picture (since I've implemented&dismissed a few approaches to fix the flink race until I've settled on this one here), but now this patch here really looks a bit silly ;-) -Danie -- 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