lkml.org 
[lkml]   [2004]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sync_sb_inodes sync hang
2.6.3-mm UP without PREEMPT easily hangs looping around pdflush's
sync_sb_inodes, failing the down_read_trylock in do_writepages,
but giving the concurrent sync no chance to complete: just try
while : ; do echo $SECONDS; sync; cp /etc/termcap .; done

I think sync_sb_inodes is the only loop vulnerable to that
change in do_writepages, so site the cond_resched() here.

Hugh

--- 2.6.3-mm3/fs/fs-writeback.c 2004-02-23 12:51:49.000000000 +0000
+++ linux/fs/fs-writeback.c 2004-02-24 16:14:49.000000000 +0000
@@ -326,6 +326,7 @@ sync_sb_inodes(struct super_block *sb, s
writeback_release(bdi);
spin_unlock(&inode_lock);
iput(inode);
+ cond_resched();
spin_lock(&inode_lock);
if (wbc->nr_to_write <= 0)
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.152 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site