From: Mel Gorman Date: Tue, 10 Aug 2010 00:19:31 +0000 (-0700) Subject: vmscan: set up pagevec as late as possible in shrink_page_list() X-Git-Tag: v2.6.36-rc1~419 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abe4c3b50c3f25cb1baf56036024860f12f96015;p=pandora-kernel.git vmscan: set up pagevec as late as possible in shrink_page_list() shrink_page_list() sets up a pagevec to release pages as according as they are free. It uses significant amounts of stack on the pagevec. This patch adds pages to be freed via pagevec to a linked list which is then freed en-masse at the end. This avoids using stack in the main path that potentially calls writepage(). Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Cc: Dave Chinner Cc: Chris Mason Cc: Nick Piggin Cc: Rik van Riel Cc: Johannes Weiner Cc: Christoph Hellwig Cc: KAMEZAWA Hiroyuki Cc: KOSAKI Motohiro Cc: Andrea Arcangeli Cc: Michael Rubin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed