Skip to content

Commit

Permalink
writeback: skip tmpfs early in balance_dirty_pages_ratelimited_nr()
Browse files Browse the repository at this point in the history
This helps prevent tmpfs dirtiers from skewing the per-cpu bdp_ratelimits.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
  • Loading branch information
Wu Fengguang committed Jun 19, 2011
1 parent e84d0a4 commit 36715ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,6 @@ static void balance_dirty_pages(struct address_space *mapping,
bool dirty_exceeded = false;
struct backing_dev_info *bdi = mapping->backing_dev_info;

if (!bdi_cap_account_dirty(bdi))
return;

for (;;) {
struct writeback_control wbc = {
.sync_mode = WB_SYNC_NONE,
Expand Down Expand Up @@ -631,9 +628,13 @@ static DEFINE_PER_CPU(unsigned long, bdp_ratelimits) = 0;
void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
unsigned long nr_pages_dirtied)
{
struct backing_dev_info *bdi = mapping->backing_dev_info;
unsigned long ratelimit;
unsigned long *p;

if (!bdi_cap_account_dirty(bdi))
return;

ratelimit = ratelimit_pages;
if (mapping->backing_dev_info->dirty_exceeded)
ratelimit = 8;
Expand Down

0 comments on commit 36715ce

Please sign in to comment.