Re: 2.5.70-bk16: nfs crash

From: Dipankar Sarma (
Date: Thu Jun 12 2003 - 10:53:45 EST

On Thu, Jun 12, 2003 at 08:35:14AM -0700, Trond Myklebust wrote:
> >>>>> " " == Dipankar Sarma <> writes:
> > __d_drop() *must not* initialize d_hash fields. Lockfree lookup
> > depends on that. If __d_drop() needs to be allowed on an
> > unhashed dentry, the right thing to do would be to check for
> > DCACHE_UNHASHED before unhashing. I will submit a patch a
> > little later to do this.
> Can you please remind us exactly what the benefits of all this are?
> Why can't d_free() immediately free the memory instead of relying on
> the RCU mechanism?

Because we no longer hold the dcache_lock while doing a d_lookup().
With the dentry still around (RCU wouldn't happen until all CPUs
do a context switch or execute user-level code), lookup can continue
to traverse the hash list while another CPU deletes the currrent
dentry. Once RCU happens, it is guranteed that no other CPU
could be in that dentry during hash list traversal. That is why
we have _rcu versions of the list deletion macros.
Lockfree d_lookup() gives us significant benefits in larger
SMP machines.

Does my patch meet the requirements that you had for __d_drop() ?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:32 EST