lkml.org 
[lkml]   [2006]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kref refcnt and false positives
On Thu, 14 Dec 2006 17:19:55 -0700
ebiederm@xmission.com (Eric W. Biederman) wrote:

> "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> writes:
>
> >>But I believe Venkatesh problem comes from its release()
> >>function : It is
> >>supposed to free the object.
> >>If not, it should properly setup it so that further uses are OK.
> >>
> >>ie doing in release(kref)
> >>atomic_set(&kref->count, 0);
> >>
> >
> > Agreed that setting kref refcnt to 0 in release will solve the probloem.
> > But, once the optimization code is removed, we don't need to set it to
> > zero as release will only be called after the count reaches zero anyway.
>
> The primary point of the optimization is to not write allocate a cache line
> unnecessarily. I don't know it's value, but it can have one especially
> on big way SMP machines.

Guys, we have about 1000000000000000000000000000000 reports of weirdo
crashes, smashes, bashes and splats in the kref code. The last thing we
need is some obscure, tricksy little optimisation which leads legitimate
uses of the API to mysteriously fail.

If we are allocating and freeing kref-counted objects at a sufficiently
high frequency for this thing to make a difference then we should fix that
instead of trying to suck faster.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-15 01:39    [W:0.873 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site