[PATCH 1/2] ksm: remove ksm from being a module.

From: Izik Eidus
Date: Tue Jun 09 2009 - 14:00:55 EST


Signed-off-by: Izik Eidus <ieidus@xxxxxxxxxx>
---
include/linux/mm.h | 2 +-
include/linux/rmap.h | 4 ++--
mm/Kconfig | 5 ++---
mm/memory.c | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index e617bab..cdc08d2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1258,7 +1258,7 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn);

-#if defined(CONFIG_KSM) || defined(CONFIG_KSM_MODULE)
+#if defined(CONFIG_KSM)
int replace_page(struct vm_area_struct *vma, struct page *oldpage,
struct page *newpage, pte_t orig_pte, pgprot_t prot);
#endif
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 469376d..939c171 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -118,7 +118,7 @@ static inline int try_to_munlock(struct page *page)
}
#endif

-#if defined(CONFIG_KSM) || defined(CONFIG_KSM_MODULE)
+#if defined(CONFIG_KSM)
int page_wrprotect(struct page *page, int *odirect_sync, int count_offset);
#endif

@@ -136,7 +136,7 @@ static inline int page_mkclean(struct page *page)
return 0;
}

-#if defined(CONFIG_KSM) || defined(CONFIG_KSM_MODULE)
+#if defined(CONFIG_KSM)
static inline int page_wrprotect(struct page *page, int *odirect_sync,
int count_offset)
{
diff --git a/mm/Kconfig b/mm/Kconfig
index 5ebfd18..e7c118f 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -227,10 +227,9 @@ config MMU_NOTIFIER
bool

config KSM
- tristate "Enable KSM for page sharing"
+ bool "Enable KSM for page sharing"
help
- Enable the KSM kernel module to allow page sharing of equal pages
- among different tasks.
+ Enable KSM to allow page sharing of equal pages among different tasks.

config NOMMU_INITIAL_TRIM_EXCESS
int "Turn on mmap() excess space trimming before booting"
diff --git a/mm/memory.c b/mm/memory.c
index 8b4e40e..e23d4dd 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1617,7 +1617,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
}
EXPORT_SYMBOL(vm_insert_mixed);

-#if defined(CONFIG_KSM) || defined(CONFIG_KSM_MODULE)
+#if defined(CONFIG_KSM)

/**
* replace_page - replace page in vma with new page
--
1.5.6.5