projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libata: irq-pio build fixes
[powerpc.git]
/
mm
/
page-writeback.c
diff --git
a/mm/page-writeback.c
b/mm/page-writeback.c
index
74138c9
..
945559f
100644
(file)
--- a/
mm/page-writeback.c
+++ b/
mm/page-writeback.c
@@
-46,7
+46,7
@@
static long ratelimit_pages = 32;
static long total_pages; /* The total number of pages in the machine. */
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
/*
* When balance_dirty_pages decides that the caller needs to perform some
@@
-212,7
+212,8
@@
static void balance_dirty_pages(struct address_space *mapping)
if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh)
break;
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
/* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
* Unstable writes are a feature of certain networked
@@
-234,7
+235,7
@@
static void balance_dirty_pages(struct address_space *mapping)
blk_congestion_wait(WRITE, HZ/10);
}
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))
dirty_exceeded = 0;
if (writeback_in_progress(bdi))
@@
-550,11
+551,17
@@
void __init page_writeback_init(void)
int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
+ int ret;
+
if (wbc->nr_to_write <= 0)
return 0;
if (wbc->nr_to_write <= 0)
return 0;
+ wbc->for_writepages = 1;
if (mapping->a_ops->writepages)
if (mapping->a_ops->writepages)
- return mapping->a_ops->writepages(mapping, wbc);
- return generic_writepages(mapping, wbc);
+ ret = mapping->a_ops->writepages(mapping, wbc);
+ else
+ ret = generic_writepages(mapping, wbc);
+ wbc->for_writepages = 0;
+ return ret;
}
/**
}
/**
@@
-750,6
+757,7
@@
int clear_page_dirty_for_io(struct page *page)
}
return TestClearPageDirty(page);
}
}
return TestClearPageDirty(page);
}
+EXPORT_SYMBOL(clear_page_dirty_for_io);
int test_clear_page_writeback(struct page *page)
{
int test_clear_page_writeback(struct page *page)
{