[Devel] [PATCH RHEL7 COMMIT] fuse: never skip writeback if there are too many background requests

Konstantin Khorenko khorenko at virtuozzo.com
Fri Apr 29 07:34:36 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.15
------>
commit d74eeb9445184dda1f97a718f85743cdd9ebfb42
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Fri Apr 29 18:34:36 2016 +0400

    fuse: never skip writeback if there are too many background requests
    
    This patch removes two hunks introduced while porting
    diff-fuse-some-fairness-in-handling-writeback from PCS6, see commit
    9525f63ba3151 ("fuse: some fairness in handling writeback").
    
    In the original patch, these two hunks skip page writeback only if
    writeback_control->nonblocking flag is set, while in the ported version
    writeback may be skipped if writeback_control->sync_mode = WB_SYNC_NONE.
    This is not equivalent, because in RH6 based kernels wbc->nonblocking is
    set only from the reclaim and compaction paths, while WB_SYNC_NONE is
    used in all paths except fsync. As a result, in Vz7 the possibility of
    reordering writeback sequence is higher than in PCS6.
    
    Since in RH7 based kernels wbc->nonblocking is absent, let's simply zap
    these two hunks in order to be closer to conventional PCS6 behavior.
    
    Note, the possibility of reordering writeback sequence still exists (as
    it does in PCS6), because writeback can be performed by kswapd on memory
    shortage - see shrink_page_list -> pageout.
    
    https://jira.sw.ru/browse/PSBM-45497
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
    Acked-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
 fs/fuse/file.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 11c5959..9889e26 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2109,12 +2109,6 @@ static int fuse_writepages_fill(struct page *page,
 	     req->pages[req->num_pages - 1]->index + 1 != page->index)) {
 		int err;
 
-		if (wbc->sync_mode == WB_SYNC_NONE && fc->blocked) {
-			redirty_page_for_writepage(wbc, page);
-			unlock_page(page);
-			return 0;
-		}
-
 		err = fuse_send_writepages(data);
 		if (err) {
 			unlock_page(page);
@@ -2168,11 +2162,6 @@ static int fuse_writepages(struct address_space *mapping,
 	if (is_bad_inode(inode))
 		goto out;
 
-	if (wbc->sync_mode == WB_SYNC_NONE) {
-		if (fc->blocked)
-			return 0;
-	}
-
 	/*
 	 * We use fuse_blocked_for_wb() instead of just fc->blocked to avoid
 	 * deadlock when we are called from fuse_invalidate_files() in case


More information about the Devel mailing list