Re: [PATCH] drm: Replace kref with a simple atomic reference count

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

 



On Fri, 26 Nov 2010 08:38:29 +1000, Dave Airlie <airlied@xxxxxxxxxx> wrote:
> On Thu, 2010-11-25 at 21:40 +0000, Chris Wilson wrote:
> > For a deferred-free cache of unreferenced bound objects, a simple
> > reference count is required without the baggage of kref.
> 
> eh?

The issue with kref is that it does:

void kref_get(struct kref *kref)
{
        WARN_ON(!atomic_read(&kref->refcount));
        atomic_inc(&kref->refcount);
        smp_mb__after_atomic_inc();
}

which causes havoc when you are trying to keep a list of unreferenced
objects. That's all I'm trying to avoid.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux