[PATCH] SwapMig: add_to_swap() avoid atomic allocations
authorChristoph Lameter <clameter@sgi.com>
Sun, 8 Jan 2006 09:00:53 +0000 (01:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:12:42 +0000 (20:12 -0800)
commit1480a540c98525640174a7eadd712378fcd6fd63
tree28f2cc0aa819ff0aed30dd85bb16177d4a73002b
parent8419c3181086c86664e8246bc997afc2e4ffba4f
[PATCH] SwapMig: add_to_swap() avoid atomic allocations

Add gfp_mask to add_to_swap

add_to_swap does allocations with GFP_ATOMIC in order not to interfere with
swapping.  During migration we may have use add_to_swap extensively which may
lead to out of memory errors.

This patch makes add_to_swap take a parameter that specifies the gfp mask.
The page migration code can then make add_to_swap use GFP_KERNEL.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/swap.h
mm/swap_state.c
mm/vmscan.c