Commit a18bba061c789f5815c3efc3c80e6ac269911964

Authored by Mel Gorman
Committed by Linus Torvalds
1 parent ee72886d8e

mm: vmscan: remove dead code related to lumpy reclaim waiting on pages under writeback

Lumpy reclaim worked with two passes - the first which queued pages for IO
and the second which waited on writeback.  As direct reclaim can no longer
write pages there is some dead code.  This patch removes it but direct
reclaim will continue to wait on pages under writeback while in
synchronous reclaim mode.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Alex Elder <aelder@sgi.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 5 additions and 16 deletions Side-by-side Diff

... ... @@ -495,15 +495,6 @@
495 495 return PAGE_ACTIVATE;
496 496 }
497 497  
498   - /*
499   - * Wait on writeback if requested to. This happens when
500   - * direct reclaiming a large contiguous area and the
501   - * first attempt to free a range of pages fails.
502   - */
503   - if (PageWriteback(page) &&
504   - (sc->reclaim_mode & RECLAIM_MODE_SYNC))
505   - wait_on_page_writeback(page);
506   -
507 498 if (!PageWriteback(page)) {
508 499 /* synchronous write or broken a_ops? */
509 500 ClearPageReclaim(page);
... ... @@ -804,12 +795,10 @@
804 795  
805 796 if (PageWriteback(page)) {
806 797 /*
807   - * Synchronous reclaim is performed in two passes,
808   - * first an asynchronous pass over the list to
809   - * start parallel writeback, and a second synchronous
810   - * pass to wait for the IO to complete. Wait here
811   - * for any page for which writeback has already
812   - * started.
  798 + * Synchronous reclaim cannot queue pages for
  799 + * writeback due to the possibility of stack overflow
  800 + * but if it encounters a page under writeback, wait
  801 + * for the IO to complete.
813 802 */
814 803 if ((sc->reclaim_mode & RECLAIM_MODE_SYNC) &&
815 804 may_enter_fs)
... ... @@ -1414,7 +1403,7 @@
1414 1403 }
1415 1404  
1416 1405 /*
1417   - * Returns true if the caller should wait to clean dirty/writeback pages.
  1406 + * Returns true if a direct reclaim should wait on pages under writeback.
1418 1407 *
1419 1408 * If we are direct reclaiming for contiguous pages and we do not reclaim
1420 1409 * everything in the list, try again and wait for writeback IO to complete.