>From Takashi lock profiling shows - mpage_writepages - sync_supers Are causing latency problems. This adds some conditional schedules to help fix things Index: linux-2.6.8.1-ck/fs/fs-writeback.c =================================================================== --- linux-2.6.8.1-ck.orig/fs/fs-writeback.c 2004-08-22 19:10:11.777536582 +1000 +++ linux-2.6.8.1-ck/fs/fs-writeback.c 2004-08-22 19:35:02.536608053 +1000 @@ -361,6 +361,7 @@ sync_sb_inodes(struct super_block *sb, s } spin_unlock(&inode_lock); iput(inode); + cond_resched(); spin_lock(&inode_lock); if (wbc->nr_to_write <= 0) break; @@ -420,6 +421,7 @@ restart: } spin_unlock(&sb_lock); spin_unlock(&inode_lock); + cond_resched(); } /* Index: linux-2.6.8.1-ck/fs/super.c =================================================================== --- linux-2.6.8.1-ck.orig/fs/super.c 2004-08-22 19:15:31.615071190 +1000 +++ linux-2.6.8.1-ck/fs/super.c 2004-08-22 19:35:02.537607893 +1000 @@ -317,6 +317,7 @@ void sync_supers(void) { struct super_block * sb; restart: + cond_resched(); spin_lock(&sb_lock); sb = sb_entry(super_blocks.next); while (sb != sb_entry(&super_blocks))