Commit 249ffe18 authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

gfs2: don't lock sd_ail_lock in gfs2_releasepage

Patch 380f7c65 changed gfs2_releasepage
so that it held the sd_ail_lock spin_lock for most of its processing.
It did this for some mysterious undocumented bug somewhere in the
evict code path. But in the nine years since, evict has been reworked
and fixed many times, and so have the transactions and ail list.
I can't see a reason to hold the sd_ail_lock unless it's protecting
the actual ail lists hung off the transactions. Therefore, this patch
removes the locking to increase speed and efficiency, and to further help
us rework the log flush code to be more concurrent with transactions.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 36c78309
...@@ -741,7 +741,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask) ...@@ -741,7 +741,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask)
*/ */
gfs2_log_lock(sdp); gfs2_log_lock(sdp);
spin_lock(&sdp->sd_ail_lock);
head = bh = page_buffers(page); head = bh = page_buffers(page);
do { do {
if (atomic_read(&bh->b_count)) if (atomic_read(&bh->b_count))
...@@ -753,7 +752,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask) ...@@ -753,7 +752,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask)
goto cannot_release; goto cannot_release;
bh = bh->b_this_page; bh = bh->b_this_page;
} while(bh != head); } while(bh != head);
spin_unlock(&sdp->sd_ail_lock);
head = bh = page_buffers(page); head = bh = page_buffers(page);
do { do {
...@@ -779,7 +777,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask) ...@@ -779,7 +777,6 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask)
return try_to_free_buffers(page); return try_to_free_buffers(page);
cannot_release: cannot_release:
spin_unlock(&sdp->sd_ail_lock);
gfs2_log_unlock(sdp); gfs2_log_unlock(sdp);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment