From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with ESMTP id 8F2D06B0078 for ; Wed, 8 Sep 2010 02:16:54 -0400 (EDT) Date: Wed, 8 Sep 2010 08:16:50 +0200 From: Johannes Weiner Subject: Re: [PATCH 05/10] vmscan: Synchrounous lumpy reclaim use lock_page() instead trylock_page() Message-ID: <20100908061650.GE20955@cmpxchg.org> References: <1283770053-18833-1-git-send-email-mel@csn.ul.ie> <1283770053-18833-6-git-send-email-mel@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1283770053-18833-6-git-send-email-mel@csn.ul.ie> Sender: owner-linux-mm@kvack.org To: Mel Gorman Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Linux Kernel List , Rik van Riel , Minchan Kim , Wu Fengguang , Andrea Arcangeli , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Dave Chinner , Chris Mason , Christoph Hellwig , Andrew Morton List-ID: On Mon, Sep 06, 2010 at 11:47:28AM +0100, Mel Gorman wrote: > 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 Acked-by: Johannes Weiner > --- > 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)); -- 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