The patch titled fix can_share_swap_page() when !CONFIG_SWAP has been added to the -mm tree. Its filename is fix-can_share_swap_page-when-config_swap.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Hua Zhong <hzhong@xxxxxxxxx> can_share_swap_page() is used to check if the page has the last reference. This avoids allocating a new page for COW if it's the last page. However, if CONFIG_SWAP is not set, can_share_swap_page() is defined as 0, thus always causes a copy for the last COW page. The below simple patch fixes it. Signed-off-by: Hua Zhong <hzhong@xxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/swap.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN include/linux/swap.h~fix-can_share_swap_page-when-config_swap include/linux/swap.h --- devel/include/linux/swap.h~fix-can_share_swap_page-when-config_swap 2006-05-10 22:58:19.000000000 -0700 +++ devel-akpm/include/linux/swap.h 2006-05-10 22:58:19.000000000 -0700 @@ -309,7 +309,7 @@ static inline void disable_swap_token(vo #define read_swap_cache_async(swp,vma,addr) NULL #define lookup_swap_cache(swp) NULL #define valid_swaphandles(swp, off) 0 -#define can_share_swap_page(p) 0 +#define can_share_swap_page(p) (page_mapcount(p) == 1) #define move_to_swap_cache(p, swp) 1 #define move_from_swap_cache(p, i, m) 1 #define __delete_from_swap_cache(p) /*NOTHING*/ _ Patches currently in -mm which might be from hzhong@xxxxxxxxx are origin.patch git-net.patch likely-cleanup-remove-unlikely-in-sys_mprotect.patch fix-can_share_swap_page-when-config_swap.patch rename-swapper-to-idle.patch remove-unlikely-in-might_sleep_if.patch ide-error-handling-fixes.patch profile-likely-unlikely-macros.patch profile-likely-unlikely-macros-tidy.patch profile-likely-unlikely-macros-fix.patch profile-likely-unlikely-macros-fix-2.patch fix-gcc-3x-w-likely-profiling.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html