]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock
authorTrond Myklebust <trondmy@gmail.com>
Wed, 3 Oct 2018 16:01:22 +0000 (12:01 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Oct 2018 20:57:59 +0000 (16:57 -0400)
commita7665f998aeca3bd1df6ccb575952cd9f7744145
tree1f1c8cd8581aac2bcc3dc037aaed5387c85966dc
parent9929d47a5fd904d117e66b675febafff62110da9
SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock

Instead of the reader/writer spinlock, allow cache lookups to use RCU
for looking up entries. This is more efficient since modifications can
occur while other entries are being looked up.

Note that for now, we keep the reader/writer spinlock until all users
have been converted to use RCU-safe freeing of their cache entries.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/cache.h
net/sunrpc/cache.c