|
@@ -753,8 +753,17 @@ EXPORT_SYMBOL(unlock_page);
|
|
*/
|
|
*/
|
|
void end_page_writeback(struct page *page)
|
|
void end_page_writeback(struct page *page)
|
|
{
|
|
{
|
|
- if (TestClearPageReclaim(page))
|
|
|
|
|
|
+ /*
|
|
|
|
+ * TestClearPageReclaim could be used here but it is an atomic
|
|
|
|
+ * operation and overkill in this particular case. Failing to
|
|
|
|
+ * shuffle a page marked for immediate reclaim is too mild to
|
|
|
|
+ * justify taking an atomic operation penalty at the end of
|
|
|
|
+ * ever page writeback.
|
|
|
|
+ */
|
|
|
|
+ if (PageReclaim(page)) {
|
|
|
|
+ ClearPageReclaim(page);
|
|
rotate_reclaimable_page(page);
|
|
rotate_reclaimable_page(page);
|
|
|
|
+ }
|
|
|
|
|
|
if (!test_clear_page_writeback(page))
|
|
if (!test_clear_page_writeback(page))
|
|
BUG();
|
|
BUG();
|