[patchset] Lockfree fd lookup 0 of 5

Ravikiran G Thirumalai
2004-08-02T10:15:09Z

Here is a patchset to eliminate taking struct files_struct.file_lock on
reader side using rcu and rcu based refcounting. These patches
extend the kref api to include kref_lf_xxx api and kref_lf_get_rcu to
do lockfree refcounting, and use the same. As posted earlier, since fd
lookups (struct files_struct.fd[]) will be lock free with these patches,
threaded workloads doing lots of io should see performance benefits
due to this patchset. I have observed 13-15% improvement with tiobench
on a 4 way xeon with this patchset.

The patchset contains:
1. kref-merged-2.6.7.patch -- kref shrinkage patch which GregKH has applied to
his tree.
2. kref-drivers-2.6.7.patch -- existing users of kref modified to use the
'shrunk' krefs. GregKH has applied this to his tree too
3. kref-lf-2.6.7.patch -- kref api additions for lock free refcounting.
This patch relocates kref api to kref.h as static inlines since they
are mostly wrappers around atomic_xxx operations
4. files_struct-kref-s-2.6.7.patch -- change struct file.f_count to a kref
and use kref api for refcounting. This does not add any performance
benefit and is just an intermediate patch
5. files_struct-rcu-kref-2.6.7.patch -- Make fd lookups lock free by using
rcu and kref_lf_xxx api for lockfree refcounting

The patchset will follow this post.

Thanks,
Kiran