diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2010-08-11 14:17:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 08:43:29 -0700 |
commit | 16c4042f08919f447d6b2a55679546c9b97c7264 (patch) | |
tree | 0248b64d46237854ebe67efe8c742cb5878d8611 /mm/backing-dev.c | |
parent | e50e37201ae2e7d6a52e87815759e6481f0bcfb9 (diff) | |
download | linux-3.10-16c4042f08919f447d6b2a55679546c9b97c7264.tar.gz linux-3.10-16c4042f08919f447d6b2a55679546c9b97c7264.tar.bz2 linux-3.10-16c4042f08919f447d6b2a55679546c9b97c7264.zip |
writeback: avoid unnecessary calculation of bdi dirty thresholds
Split get_dirty_limits() into global_dirty_limits()+bdi_dirty_limit(), so
that the latter can be avoided when under global dirty background
threshold (which is the normal state for most systems).
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 08d357522e7..eaa4a5bbe06 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -81,7 +81,8 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v) nr_more_io++; spin_unlock(&inode_lock); - get_dirty_limits(&background_thresh, &dirty_thresh, &bdi_thresh, bdi); + global_dirty_limits(&background_thresh, &dirty_thresh); + bdi_thresh = bdi_dirty_limit(bdi, dirty_thresh); #define K(x) ((x) << (PAGE_SHIFT - 10)) seq_printf(m, |