linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] Reduce stack usage used by page reclaim V1
@ 2010-04-15 17:21 Mel Gorman
  2010-04-15 17:21 ` [PATCH 01/10] vmscan: kill prev_priority completely Mel Gorman
                   ` (10 more replies)
  0 siblings, 11 replies; 37+ messages in thread
From: Mel Gorman @ 2010-04-15 17:21 UTC (permalink / raw)
  To: linux-mm, linux-fsdevel
  Cc: linux-kernel, Chris Mason, Dave Chinner, KOSAKI Motohiro,
	Andi Kleen, Johannes Weiner, Mel Gorman

This is just an RFC to reduce some of the more obvious stack usage in page
reclaim. It's a bit rushed and I haven't tested this yet but am sending
it out as there may be others working on similar material and would rather
avoid overlap. I built on some of Kosaki Motohiro's work.

On X86 bit, stack usage figures (generated using a modified bloat-o-meter
that uses checkstack.pl as its input) change in the following ways after
the series of patches.

add/remove: 2/0 grow/shrink: 0/4 up/down: 804/-1688 (-884)
function                                     old     new   delta
putback_lru_pages                              -     676    +676
update_isolated_counts                         -     128    +128
do_try_to_free_pages                         172     128     -44
kswapd                                      1324    1168    -156
shrink_page_list                            1616    1224    -392
shrink_zone                                 2320    1224   -1096

There are some growths there but critically they are no longer in the path
that would call writepages. In the main path, there is about 1K of stack
lopped off giving a small amount of breathing room.

KOSAKI Motohiro (3):
  vmscan: kill prev_priority completely
  vmscan: move priority variable into scan_control
  vmscan: simplify shrink_inactive_list()

Mel Gorman (7):
  vmscan: Remove useless loop at end of do_try_to_free_pages
  vmscan: Remove unnecessary temporary vars in do_try_to_free_pages
  vmscan: Split shrink_zone to reduce stack usage
  vmscan: Remove unnecessary temporary variables in shrink_zone()
  vmscan: Setup pagevec as late as possible in shrink_inactive_list()
  vmscan: Setup pagevec as late as possible in shrink_page_list()
  vmscan: Update isolated page counters outside of main path in
    shrink_inactive_list()

 include/linux/mmzone.h |   15 --
 mm/page_alloc.c        |    2 -
 mm/vmscan.c            |  447 +++++++++++++++++++++++-------------------------
 mm/vmstat.c            |    2 -
 4 files changed, 210 insertions(+), 256 deletions(-)


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2010-05-28  2:51 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-15 17:21 [RFC PATCH 00/10] Reduce stack usage used by page reclaim V1 Mel Gorman
2010-04-15 17:21 ` [PATCH 01/10] vmscan: kill prev_priority completely Mel Gorman
2010-04-16 22:37   ` Johannes Weiner
2010-04-15 17:21 ` [PATCH 02/10] vmscan: move priority variable into scan_control Mel Gorman
2010-04-16 22:48   ` Johannes Weiner
2010-05-26 10:23     ` Mel Gorman
2010-05-28  2:39       ` KOSAKI Motohiro
2010-04-15 17:21 ` [PATCH 03/10] vmscan: simplify shrink_inactive_list() Mel Gorman
2010-04-16 22:54   ` Johannes Weiner
2010-04-15 17:21 ` [PATCH 04/10] vmscan: Remove useless loop at end of do_try_to_free_pages Mel Gorman
2010-04-16  2:48   ` KOSAKI Motohiro
2010-04-16 22:56   ` Johannes Weiner
2010-04-15 17:21 ` [PATCH 05/10] vmscan: Remove unnecessary temporary vars in do_try_to_free_pages Mel Gorman
2010-04-16  2:47   ` KOSAKI Motohiro
2010-04-15 17:21 ` [PATCH 06/10] vmscan: Split shrink_zone to reduce stack usage Mel Gorman
2010-04-16  4:23   ` Dave Chinner
2010-04-16 14:27     ` Mel Gorman
2010-04-16  6:26   ` KOSAKI Motohiro
2010-04-16 23:14   ` Johannes Weiner
2010-04-15 17:21 ` [PATCH 07/10] vmscan: Remove unnecessary temporary variables in shrink_zone() Mel Gorman
2010-04-16  2:51   ` KOSAKI Motohiro
2010-04-16 23:03     ` Johannes Weiner
2010-05-26 11:21       ` Mel Gorman
2010-05-28  2:51         ` KOSAKI Motohiro
2010-04-15 17:21 ` [PATCH 08/10] vmscan: Setup pagevec as late as possible in shrink_inactive_list() Mel Gorman
2010-04-16  4:27   ` Dave Chinner
2010-04-16  6:30   ` KOSAKI Motohiro
2010-04-16 14:31     ` Mel Gorman
2010-04-16 23:28   ` Johannes Weiner
2010-04-15 17:21 ` [PATCH 09/10] vmscan: Setup pagevec as late as possible in shrink_page_list() Mel Gorman
2010-04-16  7:54   ` KOSAKI Motohiro
2010-04-16 14:34     ` Mel Gorman
2010-04-15 17:21 ` [PATCH 10/10] vmscan: Update isolated page counters outside of main path in shrink_inactive_list() Mel Gorman
2010-04-16 11:19   ` KOSAKI Motohiro
2010-04-16 14:35     ` Mel Gorman
2010-04-16 23:34   ` Johannes Weiner
2010-04-16 14:50 ` [RFC PATCH 00/10] Reduce stack usage used by page reclaim V1 Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).