Messages in this thread | | | Date | Tue, 27 Jul 2004 12:39:15 +0530 | From | Ravikiran G Thirumalai <> | Subject | Re: [patch] Add kref_read and kref_put_last primitives |
| |
On Mon, Jul 26, 2004 at 05:31:51PM +0100, Christoph Hellwig wrote: > On Mon, Jul 26, 2004 at 08:18:56PM +0530, Ravikiran G Thirumalai wrote: > > ... > > Why don't you simply use an atomic_t if that's what you seem to > want? >
struct kref does just that. The kref api are just abstractions for refcounting which i presume is recommended for all refcounters in the kernel. I am just converting the struct file.f_count refcounter to use kref with this patch.
My actual intentions are to extend the kref api to do lock free refcounting and use that for the file.f_count refcounter, and make fd lookup lock free using rcu. My earlier experiments with such patches showed performance improvements for threaded workloads which do lot of io.
Thanks, Kiran - 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/
| |