diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 16:59:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 16:59:59 -0800 |
commit | 001a541ea9163ace5e8243ee0e907ad80a4c0ec2 (patch) | |
tree | a76225046369c440de93739add9823f5ea060245 /fs | |
parent | 40ba587923ae67090d9f141c1d3c951be5c1420e (diff) | |
parent | bc31b86a5923fad5f3fbb6192f767f410241ba27 (diff) | |
download | linux-3.10-001a541ea9163ace5e8243ee0e907ad80a4c0ec2.tar.gz linux-3.10-001a541ea9163ace5e8243ee0e907ad80a4c0ec2.tar.bz2 linux-3.10-001a541ea9163ace5e8243ee0e907ad80a4c0ec2.zip |
Merge branch 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
writeback: move MIN_WRITEBACK_PAGES to fs-writeback.c
writeback: balanced_rate cannot exceed write bandwidth
writeback: do strict bdi dirty_exceeded
writeback: avoid tiny dirty poll intervals
writeback: max, min and target dirty pause time
writeback: dirty ratelimit - think time compensation
btrfs: fix dirtied pages accounting on sub-page writes
writeback: fix dirtied pages accounting on redirty
writeback: fix dirtied pages accounting on sub-page writes
writeback: charge leaked page dirties to active tasks
writeback: Include all dirty inodes in background writeback
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/file.c | 3 | ||||
-rw-r--r-- | fs/fs-writeback.c | 16 |
2 files changed, 16 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 20375e6691c..034d9850322 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1136,7 +1136,8 @@ again: GFP_NOFS); } for (i = 0; i < num_pages; i++) { - clear_page_dirty_for_io(pages[i]); + if (clear_page_dirty_for_io(pages[i])) + account_page_redirty(pages[i]); set_page_extent_mapped(pages[i]); WARN_ON(!PageLocked(pages[i])); } diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e2951506434..f855916657b 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -20,6 +20,7 @@ #include <linux/sched.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/pagemap.h> #include <linux/kthread.h> #include <linux/freezer.h> #include <linux/writeback.h> @@ -29,6 +30,11 @@ #include "internal.h" /* + * 4MB minimal write chunk size + */ +#define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_CACHE_SHIFT - 10)) + +/* * Passed into wb_writeback(), essentially a subset of writeback_control */ struct wb_writeback_work { @@ -742,11 +748,17 @@ static long wb_writeback(struct bdi_writeback *wb, if (work->for_background && !over_bground_thresh(wb->bdi)) break; + /* + * Kupdate and background works are special and we want to + * include all inodes that need writing. Livelock avoidance is + * handled by these works yielding to any other work so we are + * safe. + */ if (work->for_kupdate) { oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval * 10); - work->older_than_this = &oldest_jif; - } + } else if (work->for_background) + oldest_jif = jiffies; trace_writeback_start(wb->bdi, work); if (list_empty(&wb->b_io)) |