summaryrefslogtreecommitdiff
path: root/fs/dlm/Kconfig
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2020-08-27 22:02:49 +0300
committerDavid Teigland <teigland@redhat.com>2020-08-27 23:59:09 +0300
commita47666eb763cc1b8b48bd88185ca56676f40ca89 (patch)
treec835fdbfcd8e87d4d5e02a2b3ed0b42397bebc44 /fs/dlm/Kconfig
parentaa7ab1e20882b04fc3e45da77a9dad5cbbefba99 (diff)
downloadlinux-a47666eb763cc1b8b48bd88185ca56676f40ca89.tar.xz
fs: dlm: make connection hash lockless
There are some problems with the connections_lock. During my experiements I saw sometimes circular dependencies with sock_lock. The reason here might be code parts which runs nodeid2con() before or after sock_lock is acquired. Another issue are missing locks in for_conn() iteration. Maybe this works fine because for_conn() is running in a context where connection_hash cannot be manipulated by others anymore. However this patch changes the connection_hash to be protected by sleepable rcu. The hotpath function __find_con() is implemented lockless as it is only a reader of connection_hash and this hopefully fixes the circular locking dependencies. The iteration for_conn() will still call some sleepable functionality, that's why we use sleepable rcu in this case. This patch removes the kmemcache functionality as I think I need to make some free() functionality via call_rcu(). However allocation time isn't here an issue. The dlm_allow_con will not be protected by a lock anymore as I think it's enough to just set and flush workqueues afterwards. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/Kconfig')
-rw-r--r--fs/dlm/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/Kconfig b/fs/dlm/Kconfig
index f82a4952769d..ee92634196a8 100644
--- a/fs/dlm/Kconfig
+++ b/fs/dlm/Kconfig
@@ -4,6 +4,7 @@ menuconfig DLM
depends on INET
depends on SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n)
select IP_SCTP
+ select SRCU
help
A general purpose distributed lock manager for kernel or userspace
applications.