]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback-fix-2
authorMel Gorman <mgorman@suse.de>
Thu, 27 Jun 2013 23:51:27 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:30 +0000 (16:37 +1000)
The patch "mm: vmscan: Block kswapd if it is encountering pages under
writeback" stalls in congestion_wait it encounters a page under writeback
that is marked for immediate reclaim.  Initially this was a
wait_on_page_writeback() but after the switch to congestion_wait(), there
is no guarantee the page has completed writeback and it can be placed on a
list for freeing.

This is a fix for
mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback.patch

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c

index 45aee36d9b9324a0832bce55a7256d1af2039dce..1109de0c35bf450605d9be2657706041d4a66cb7 100644 (file)
@@ -766,8 +766,10 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                        if (current_is_kswapd() &&
                            PageReclaim(page) &&
                            zone_is_reclaim_writeback(zone)) {
+                               unlock_page(page);
                                congestion_wait(BLK_RW_ASYNC, HZ/10);
                                zone_clear_flag(zone, ZONE_WRITEBACK);
+                               goto keep;
 
                        /* Case 2 above */
                        } else if (global_reclaim(sc) ||