On Fri, 25 Jan 2002 15:00:00 +0530
Dipankar Sarma <dipankar@in.ibm.com> wrote:
> Since there has been speculation about the throughput #s for lower end,
> I have put up the comparison graph in the same page
> (http://lse.sf.net/locking/dcache/dcache_lock.html).
Have you thought about getting rid of the lru list altogether, and
traverse one chain at a time in prune_dcache, using the referenced bit as
a straight clock algorithm:
spin_lock(&dentry->d_lock);
if (atomic_read(dentry->dcount) == 0) {
if (dentry->d_vfs_flags & DCACHE_REFERENCED)
dentry->d_vfs_flags &= ~DCACHE_REFERENCED;
else
prune_one_dentry(dentry);
}
spin_unlock(&dentry->d_lock);
This can be optimized by doing a dcount check outside the loop, and the
global dcache lock can be dropped between each hash chain, and we can
store the last traversed hash chain in a static var, protected by the
global lock.
I'm just not sure how much the "semi" LRU wins us...
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:56 EST