lkml.org 
[lkml]   [2009]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] ksm: change default values to better fit into mainline kernel
On Wed, 23 Sep 2009 23:05:47 +0300
Izik Eidus <ieidus@redhat.com> wrote:

> +static void __init ksm_init_max_kernel_pages(void)
> +{
> + ksm_max_kernel_pages = nr_free_buffer_pages() / 4;
> +}
> +
> static int __init ksm_slab_init(void)
> {
> rmap_item_cache = KSM_KMEM_CACHE(rmap_item, 0);
> @@ -1667,6 +1673,8 @@ static int __init ksm_init(void)
> struct task_struct *ksm_thread;
> int err;
>
> + ksm_init_max_kernel_pages();

Was it really worth creating a new function for this?

--- a/mm/ksm.c~ksm-change-default-values-to-better-fit-into-mainline-kernel-fix
+++ a/mm/ksm.c
@@ -184,11 +184,6 @@ static DEFINE_SPINLOCK(ksm_mmlist_lock);
sizeof(struct __struct), __alignof__(struct __struct),\
(__flags), NULL)

-static void __init ksm_init_max_kernel_pages(void)
-{
- ksm_max_kernel_pages = nr_free_buffer_pages() / 4;
-}
-
static int __init ksm_slab_init(void)
{
rmap_item_cache = KSM_KMEM_CACHE(rmap_item, 0);
@@ -1673,7 +1668,7 @@ static int __init ksm_init(void)
struct task_struct *ksm_thread;
int err;

- ksm_init_max_kernel_pages();
+ ksm_max_kernel_pages = nr_free_buffer_pages() / 4;

err = ksm_slab_init();
if (err)
_
oh well, whatever.


\
 
 \ /
  Last update: 2009-09-23 22:41    [from the cache]
©2003-2011 Jasper Spaans