The patch titled writeback: pass writeback_control down to move_expired_inodes() has been added to the -mm tree. Its filename is writeback-pass-writeback_control-down-to-move_expired_inodes.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: writeback: pass writeback_control down to move_expired_inodes() From: Wu Fengguang <fengguang.wu@xxxxxxxxx> This patchset aims to reduce possible pageout() calls by making the flusher concentrate a bit more on old/expired dirty inodes. Rationales and benchmark numbers are provided in patches 5 and 6. This patch: Pass writeback_control down to move_expired_inodes(). No behavior change. This will add debug visibility to the code, for example, to dump the wbc contents when kprobing queue_io(). Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Acked-by: Jan Kara <jack@xxxxxxx> Acked-by: Mel Gorman <mel@xxxxxxxxx> Cc: Itaru Kitayama <kitayama@xxxxxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/fs-writeback.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff -puN fs/fs-writeback.c~writeback-pass-writeback_control-down-to-move_expired_inodes fs/fs-writeback.c --- a/fs/fs-writeback.c~writeback-pass-writeback_control-down-to-move_expired_inodes +++ a/fs/fs-writeback.c @@ -251,8 +251,8 @@ static bool inode_dirtied_after(struct i * Move expired dirty inodes from @delaying_queue to @dispatch_queue. */ static void move_expired_inodes(struct list_head *delaying_queue, - struct list_head *dispatch_queue, - unsigned long *older_than_this) + struct list_head *dispatch_queue, + struct writeback_control *wbc) { LIST_HEAD(tmp); struct list_head *pos, *node; @@ -262,8 +262,8 @@ static void move_expired_inodes(struct l while (!list_empty(delaying_queue)) { inode = wb_inode(delaying_queue->prev); - if (older_than_this && - inode_dirtied_after(inode, *older_than_this)) + if (wbc->older_than_this && + inode_dirtied_after(inode, *wbc->older_than_this)) break; if (sb && sb != inode->i_sb) do_sb_sort = 1; @@ -299,11 +299,11 @@ static void move_expired_inodes(struct l * | * +--> dequeue for IO */ -static void queue_io(struct bdi_writeback *wb, unsigned long *older_than_this) +static void queue_io(struct bdi_writeback *wb, struct writeback_control *wbc) { assert_spin_locked(&inode_wb_list_lock); list_splice_init(&wb->b_more_io, &wb->b_io); - move_expired_inodes(&wb->b_dirty, &wb->b_io, older_than_this); + move_expired_inodes(&wb->b_dirty, &wb->b_io, wbc); } static int write_inode(struct inode *inode, struct writeback_control *wbc) @@ -579,7 +579,7 @@ void writeback_inodes_wb(struct bdi_writ wbc->wb_start = jiffies; /* livelock avoidance */ spin_lock(&inode_wb_list_lock); if (!wbc->for_kupdate || list_empty(&wb->b_io)) - queue_io(wb, wbc->older_than_this); + queue_io(wb, wbc); while (!list_empty(&wb->b_io)) { struct inode *inode = wb_inode(wb->b_io.prev); @@ -606,7 +606,7 @@ static void __writeback_inodes_sb(struct spin_lock(&inode_wb_list_lock); if (!wbc->for_kupdate || list_empty(&wb->b_io)) - queue_io(wb, wbc->older_than_this); + queue_io(wb, wbc); writeback_sb_inodes(sb, wb, wbc, true); spin_unlock(&inode_wb_list_lock); } _ Patches currently in -mm which might be from fengguang.wu@xxxxxxxxx are mm-per-node-vmstat-show-proper-vmstats.patch mm-per-node-vmstat-show-proper-vmstats-fix.patch writeback-pass-writeback_control-down-to-move_expired_inodes.patch writeback-introduce-writeback_controlinodes_cleaned.patch writeback-try-more-writeback-as-long-as-something-was-written.patch writeback-the-kupdate-expire-timestamp-should-be-a-moving-target.patch writeback-sync-expired-inodes-first-in-background-writeback.patch writeback-sync-expired-inodes-first-in-background-writeback-fix.patch writeback-refill-b_io-iff-empty.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html