From mboxrd@z Thu Jan 1 00:00:00 1970 From: swhiteho@redhat.com Date: Thu, 17 Apr 2008 09:38:43 +0100 Subject: [Cluster-devel] [PATCH 07/48] [GFS2] Only wake the reclaim daemon if we need to In-Reply-To: <12084215802470-git-send-email-swhiteho@redhat.com> References: 12084214272083-git-send-email-swhiteho@redhat.com <12084215642582-git-send-email-swhiteho@redhat.com> <1208421571478-git-send-email-swhiteho@redhat.com> <12084215742081-git-send-email-swhiteho@redhat.com> <12084215763647-git-send-email-swhiteho@redhat.com> <12084215781246-git-send-email-swhiteho@redhat.com> <12084215802470-git-send-email-swhiteho@redhat.com> Message-ID: <12084215833555-git-send-email-swhiteho@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Bob Peterson This patch only wakes up the glock reclaim daemon if there is actually something to be reclaimed. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 7175a4d..5752dec 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1594,10 +1594,10 @@ void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl) gfs2_glock_hold(gl); list_add(&gl->gl_reclaim, &sdp->sd_reclaim_list); atomic_inc(&sdp->sd_reclaim_count); - } - spin_unlock(&sdp->sd_reclaim_lock); - - wake_up(&sdp->sd_reclaim_wq); + spin_unlock(&sdp->sd_reclaim_lock); + wake_up(&sdp->sd_reclaim_wq); + } else + spin_unlock(&sdp->sd_reclaim_lock); } /** -- 1.5.1.2