summaryrefslogtreecommitdiff
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-11-02 22:17:17 +0300
committerDavid Teigland <teigland@redhat.com>2021-11-02 22:39:20 +0300
commit164d88abd7608e869b7617d5ff8893344fdda759 (patch)
treef8175515fd4c243b8b55faf578eefc5906968e7c /fs/dlm/dlm_internal.h
parent92732376fd29462b502f41486bcef55f49c5713e (diff)
downloadlinux-164d88abd7608e869b7617d5ff8893344fdda759.tar.xz
fs: dlm: requestqueue busy wait to event based wait
This patch changes the requestqueue busy waiting algorithm to use atomic counter values and wait_event() to wait until the requestqueue is empty. It will slightly reduce the number of holding ls_requestqueue_mutex mutex. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 44a5c67b5213..fd1c7a8c4485 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -626,6 +626,8 @@ struct dlm_ls {
struct rw_semaphore ls_in_recovery; /* block local requests */
struct rw_semaphore ls_recv_active; /* block dlm_recv */
struct list_head ls_requestqueue;/* queue remote requests */
+ atomic_t ls_requestqueue_cnt;
+ wait_queue_head_t ls_requestqueue_wait;
struct mutex ls_requestqueue_mutex;
struct dlm_rcom *ls_recover_buf;
int ls_recover_nodeid; /* for debugging */