- fix-can_share_swap_page-when-config_swap.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     fix can_share_swap_page() when !CONFIG_SWAP

has been removed from the -mm tree.  Its filename is

     fix-can_share_swap_page-when-config_swap.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


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-15 09:43:27.000000000 -0700
+++ devel-akpm/include/linux/swap.h	2006-05-15 09:43:27.000000000 -0700
@@ -296,7 +296,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
likely-cleanup-remove-unlikely-in-sys_mprotect.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux