diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-14 08:38:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-14 08:38:28 -0500 |
commit | 0c3c35e148dbc03106038dd25816fb9f3a084d86 (patch) | |
tree | 8b8cc6a027353a0f242f61362b35b0942da61b83 /mm/ksm.c | |
parent | 50d40f187f9182ee8caa1b83f80a0e11e2226baa (diff) | |
parent | 5e08fe570c2dbabb5015c37049eb9a451e55c890 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -184,11 +184,6 @@ static DEFINE_SPINLOCK(ksm_mmlist_lock); | |||
184 | sizeof(struct __struct), __alignof__(struct __struct),\ | 184 | sizeof(struct __struct), __alignof__(struct __struct),\ |
185 | (__flags), NULL) | 185 | (__flags), NULL) |
186 | 186 | ||
187 | static void __init ksm_init_max_kernel_pages(void) | ||
188 | { | ||
189 | ksm_max_kernel_pages = nr_free_buffer_pages() / 4; | ||
190 | } | ||
191 | |||
192 | static int __init ksm_slab_init(void) | 187 | static int __init ksm_slab_init(void) |
193 | { | 188 | { |
194 | rmap_item_cache = KSM_KMEM_CACHE(rmap_item, 0); | 189 | rmap_item_cache = KSM_KMEM_CACHE(rmap_item, 0); |
@@ -1673,7 +1668,7 @@ static int __init ksm_init(void) | |||
1673 | struct task_struct *ksm_thread; | 1668 | struct task_struct *ksm_thread; |
1674 | int err; | 1669 | int err; |
1675 | 1670 | ||
1676 | ksm_init_max_kernel_pages(); | 1671 | ksm_max_kernel_pages = totalram_pages / 4; |
1677 | 1672 | ||
1678 | err = ksm_slab_init(); | 1673 | err = ksm_slab_init(); |
1679 | if (err) | 1674 | if (err) |
@@ -1697,6 +1692,9 @@ static int __init ksm_init(void) | |||
1697 | kthread_stop(ksm_thread); | 1692 | kthread_stop(ksm_thread); |
1698 | goto out_free2; | 1693 | goto out_free2; |
1699 | } | 1694 | } |
1695 | #else | ||
1696 | ksm_run = KSM_RUN_MERGE; /* no way for user to start it */ | ||
1697 | |||
1700 | #endif /* CONFIG_SYSFS */ | 1698 | #endif /* CONFIG_SYSFS */ |
1701 | 1699 | ||
1702 | return 0; | 1700 | return 0; |