[Devel] [PATCH RHEL7 COMMIT] Revert "fs-writeback: add endless writeback debug"

Konstantin Khorenko khorenko at virtuozzo.com
Fri Oct 27 15:58:52 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.vz7.37.19
------>
commit 1c76dccf17c78ea9bc73d21afa869d803158a73f
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Fri Oct 27 15:56:27 2017 +0300

    Revert "fs-writeback: add endless writeback debug"
    
    This reverts commit f2e215b63eaa29675ede31c041f2bf5782c30f4d.
    
    This debug patch was intended to find and fix soft lockups
    on fs resize.
    
    We've fixed them in the scope of
    https://jira.sw.ru/browse/PSBM-69788
    
    So the debug patch is not needed anymore.
    
    https://jira.sw.ru/browse/PSBM-71195
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/fs-writeback.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 7cea021..cc67d71 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -788,15 +788,11 @@ static long __writeback_inodes_wb(struct bdi_writeback *wb,
 {
 	unsigned long start_time = jiffies;
 	long wrote = 0;
-	int trace = 0;
 
 	while (!list_empty(&wb->b_io)) {
 		struct inode *inode = wb_inode(wb->b_io.prev);
 		struct super_block *sb = inode->i_sb;
 
-		if (time_is_before_jiffies(start_time + 15* HZ))
-			trace = 1;
-
 		if (!trylock_super(sb)) {
 			/*
 			 * trylock_super() may fail consistently due to
@@ -804,9 +800,6 @@ static long __writeback_inodes_wb(struct bdi_writeback *wb,
 			 * requeue_io() to avoid busy retrying the inode/sb.
 			 */
 			redirty_tail(inode, wb);
-			if (trace)
-				printk("%s:%d writeback is taking too long ino:%ld sb(%p):%s\n",
-				       __FUNCTION__, __LINE__, inode->i_ino, sb, sb->s_id);
 			continue;
 		}
 		wrote += writeback_sb_inodes(sb, wb, work);
@@ -898,7 +891,6 @@ static long wb_writeback(struct bdi_writeback *wb,
 	unsigned long oldest_jif;
 	struct inode *inode;
 	long progress;
-	int trace = 0;
 
 	oldest_jif = jiffies;
 	work->older_than_this = &oldest_jif;
@@ -911,9 +903,6 @@ static long wb_writeback(struct bdi_writeback *wb,
 		if (work->nr_pages <= 0)
 			break;
 
-		if (time_is_before_jiffies(wb_start + 15* HZ))
-			trace = 1;
-
 		/*
 		 * Background writeout and kupdate-style writeback may
 		 * run forever. Stop them if there is other work to do
@@ -985,10 +974,6 @@ static long wb_writeback(struct bdi_writeback *wb,
 			inode = wb_inode(wb->b_more_io.prev);
 			spin_lock(&inode->i_lock);
 			spin_unlock(&wb->list_lock);
-			if (trace)
-				printk("%s:%d writeback is taking too long ino:%ld st:%ld sb(%p):%s\n",
-				       __FUNCTION__, __LINE__, inode->i_ino,
-				       inode->i_state, inode->i_sb, inode->i_sb->s_id);
 			/* This function drops i_lock... */
 			inode_sleep_on_writeback(inode);
 			spin_lock(&wb->list_lock);


More information about the Devel mailing list