Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18904
b: refs/heads/master
c: e236a16
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jan 19, 2006
1 parent 113640f commit 59977eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2aeacd48ca2418fbac985a58d2200c263444d65
refs/heads/master: e236a166b2bc437769a9b8b5d19186a3761bde48
7 changes: 4 additions & 3 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
static long ratelimit_pages = 32;

static long total_pages; /* The total number of pages in the machine. */
static int dirty_exceeded; /* Dirty mem may be over limit */
static int dirty_exceeded __cacheline_aligned_in_smp; /* Dirty mem may be over limit */

/*
* When balance_dirty_pages decides that the caller needs to perform some
Expand Down Expand Up @@ -212,7 +212,8 @@ static void balance_dirty_pages(struct address_space *mapping)
if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh)
break;

dirty_exceeded = 1;
if (!dirty_exceeded)
dirty_exceeded = 1;

/* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
* Unstable writes are a feature of certain networked
Expand All @@ -234,7 +235,7 @@ static void balance_dirty_pages(struct address_space *mapping)
blk_congestion_wait(WRITE, HZ/10);
}

if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh)
if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh && dirty_exceeded)
dirty_exceeded = 0;

if (writeback_in_progress(bdi))
Expand Down

0 comments on commit 59977eb

Please sign in to comment.