From: Mel Gorman Subject: [PATCH 05/10] vmscan: Synchrounous lumpy reclaim use lock_page() instead trylock_page() Date: Mon, 6 Sep 2010 11:47:28 +0100 Message-ID: <1283770053-18833-6-git-send-email-mel@csn.ul.ie> References: <1283770053-18833-1-git-send-email-mel@csn.ul.ie> Cc: Linux Kernel List , Rik van Riel , Johannes Weiner , Minchan Kim , Wu Fengguang , Andrea Arcangeli , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Dave Chinner , Chris Mason , Christoph Hellwig , Andrew Morton , Mel Gorman To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Return-path: In-Reply-To: <1283770053-18833-1-git-send-email-mel@csn.ul.ie> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org From: KOSAKI Motohiro With synchrounous lumpy reclaim, there is no reason to give up to reclaim pages even if page is locked. This patch uses lock_page() instead of trylock_page() in this case. Signed-off-by: KOSAKI Motohiro Signed-off-by: Mel Gorman --- mm/vmscan.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 5979850..79bd812 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -665,7 +665,9 @@ static unsigned long shrink_page_list(struct list_head *page_list, page = lru_to_page(page_list); list_del(&page->lru); - if (!trylock_page(page)) + if (sync_writeback == PAGEOUT_IO_SYNC) + lock_page(page); + else if (!trylock_page(page)) goto keep; VM_BUG_ON(PageActive(page)); -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org