diff options
author | Ken Chen <kenchen@google.com> | 2007-10-17 02:30:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:02 -0400 |
commit | 0e0f4fc22ece8e593167eccbb1a4154565c11faa (patch) | |
tree | 564ab2eabb31ab945c334706662854bb227f45e9 /include/linux/fs.h | |
parent | 670e4def6ef5f44315d62748134e535b479c784f (diff) |
writeback: fix periodic superblock dirty inode flushing
Current -mm tree has bucketful of bug fixes in periodic writeback path.
However, we still hit a glitch where dirty pages on a given inode aren't
completely flushed to the disk, and system will accumulate large amount of
dirty pages beyond what dirty_expire_interval is designed for.
The problem is __sync_single_inode() will move an inode to sb->s_dirty list
even when there are more pending dirty pages on that inode. If there is
another inode with a small number of dirty pages, we hit a case where the loop
iteration in wb_kupdate() terminates prematurely because wbc.nr_to_write > 0.
Thus leaving the inode that has large amount of dirty pages behind and it has
to wait for another dirty_writeback_interval before we flush it again. We
effectively only write out MAX_WRITEBACK_PAGES every dirty_writeback_interval.
If the rate of dirtying is sufficiently high, the system will start
accumulate a large number of dirty pages.
So fix it by having another sb->s_more_io list on which to park the inode
while we iterate through sb->s_io and to allow each dirty inode which resides
on that sb to have an equal chance of flushing some amount of dirty pages.
Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 30aca3399450..0b38a897c114 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1002,6 +1002,7 @@ struct super_block { | |||
1002 | struct list_head s_inodes; /* all inodes */ | 1002 | struct list_head s_inodes; /* all inodes */ |
1003 | struct list_head s_dirty; /* dirty inodes */ | 1003 | struct list_head s_dirty; /* dirty inodes */ |
1004 | struct list_head s_io; /* parked for writeback */ | 1004 | struct list_head s_io; /* parked for writeback */ |
1005 | struct list_head s_more_io; /* parked for more writeback */ | ||
1005 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1006 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
1006 | struct list_head s_files; | 1007 | struct list_head s_files; |
1007 | 1008 | ||