Re: [patch] Use kref for struct file.f_count refcounter

From: Andrew Morton
Date: Tue Jul 27 2004 - 02:19:51 EST


Ravikiran G Thirumalai <kiran@xxxxxxxxxx> wrote:
>
> On Mon, Jul 26, 2004 at 10:30:36PM -0700, Andrew Morton wrote:
> > Ravikiran G Thirumalai <kiran@xxxxxxxxxx> wrote:
> > >
> > > This patch makes use of the kref api for the
> > > struct file.f_count refcounter. This depends
> > > on the new kref apis kref_read and kref_put_last
> > > added by means of my earlier patch today.
> >
> > Sorry, but I can't really see how this improves anything. It'll slow
> > things down infinitesimally and it forces the reader to look elsewhere in
> > the tree to see what's going on.
> >
>
> It doesn't improve anything in terms of performance or anything. It just
> makes use of the kref api for refcounting. My next patchset will be to
> extend the kref api to do lockfree refcounting, and eliminate
> use of files_struct.file_lock on the reader side (lock free fd lookup) .

That would have been a useful thing to have mentioned in the description of
these patches, no?

> I can do a patch to just extend kref api for lockfree refcounting and
> use them for for the lock free fd lookup patch directly if you like to see
> it that way.

uh, whatever you think is best will suit at this time.

Please send all the patches, (as in: every single one) at the same time,
with complete descriptions. Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/