Is RCU not safe enough to protect dcache hlist?
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Mon Mar 16 02:02:33 EDT 2015
On Mon, 16 Mar 2015 10:06:37 +0800, Lee said:
> I am studying the dcache in VFS recently . I found that hlist of dcache
> is already protected by RCU in
> __d_lookup.Is it necessary for the function -- d_lookup using
> sequence lock to protect the hlist again?
RCU is useful when you can tolerate a bit of latency in other users
finding out about updated values and/or slightly stale values. That's
not an option for d_lookup(), which has to check the most recent value
in order to avoid race conditions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150316/076571ec/attachment.bin
More information about the Kernelnewbies
mailing list