aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2010-08-11 17:17:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 11:43:29 -0400
commit16c4042f08919f447d6b2a55679546c9b97c7264 (patch)
tree0248b64d46237854ebe67efe8c742cb5878d8611 /fs/fs-writeback.c
parente50e37201ae2e7d6a52e87815759e6481f0bcfb9 (diff)
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 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 2f76c4a081a2..fca43d4d7bf4 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -590,7 +590,7 @@ static inline bool over_bground_thresh(void)
590{ 590{
591 unsigned long background_thresh, dirty_thresh; 591 unsigned long background_thresh, dirty_thresh;
592 592
593 get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL); 593 global_dirty_limits(&background_thresh, &dirty_thresh);
594 594
595 return (global_page_state(NR_FILE_DIRTY) + 595 return (global_page_state(NR_FILE_DIRTY) +
596 global_page_state(NR_UNSTABLE_NFS) >= background_thresh); 596 global_page_state(NR_UNSTABLE_NFS) >= background_thresh);