Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967203Ab3E2XR5 (ORCPT ); Wed, 29 May 2013 19:17:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48012 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967107Ab3E2XRm (ORCPT ); Wed, 29 May 2013 19:17:42 -0400 From: Mel Gorman To: Andrew Morton Cc: Jiri Slaby , Valdis Kletnieks , Rik van Riel , Zlatko Calusic , Johannes Weiner , dormando , Michal Hocko , Jan Kara , Dave Chinner , Kamezawa Hiroyuki , Linux-FSDevel , Linux-MM , LKML , Mel Gorman Subject: [PATCH 1/8] mm: vmscan: Block kswapd if it is encountering pages under writeback -fix Date: Thu, 30 May 2013 00:17:30 +0100 Message-Id: <1369869457-22570-2-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1369869457-22570-1-git-send-email-mgorman@suse.de> References: <1369869457-22570-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1308 Lines: 38 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 --- mm/vmscan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/vmscan.c b/mm/vmscan.c index b1b38ad..4a43c28 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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) || -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/