This patch prepares to switch some locks to a spinlock. In this case we
need to remove some explicit schedule points when a spinlock is held.
We might have less scheduling points to try to serve others, we need to
see if this still makes problems when we remove them and find other
solutions.

Signed-off-by: Alexander Aring <aahri...@redhat.com>
---
 fs/dlm/lock.c         | 2 --
 fs/dlm/recover.c      | 1 -
 fs/dlm/requestqueue.c | 1 -
 3 files changed, 4 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 970b8499b66f..61eb285c613c 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -4979,7 +4979,6 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls)
                        log_error(ls, "invalid lkb wait_type %d %d",
                                  lkb->lkb_wait_type, wait_type);
                }
-               schedule();
        }
        mutex_unlock(&ls->ls_waiters_mutex);
        kfree(ms_local);
@@ -5218,7 +5217,6 @@ void dlm_recover_purge(struct dlm_ls *ls)
                }
                unlock_rsb(r);
                unhold_rsb(r);
-               cond_resched();
        }
        up_write(&ls->ls_root_sem);
 
diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c
index ce6dc914cb86..752002304ca9 100644
--- a/fs/dlm/recover.c
+++ b/fs/dlm/recover.c
@@ -543,7 +543,6 @@ int dlm_recover_masters(struct dlm_ls *ls, uint64_t seq)
                else
                        error = recover_master(r, &count, seq);
                unlock_rsb(r);
-               cond_resched();
                total++;
 
                if (error) {
diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c
index c05940afd063..ef7b7c8d6907 100644
--- a/fs/dlm/requestqueue.c
+++ b/fs/dlm/requestqueue.c
@@ -106,7 +106,6 @@ int dlm_process_requestqueue(struct dlm_ls *ls)
                        error = -EINTR;
                        break;
                }
-               schedule();
        }
 
        return error;
-- 
2.31.1

Reply via email to