linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Ben Gamari <bgamari.foss@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Jesper Juhl <jj@chaosbits.net>,
	Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH] Add Kconfig option for default swappiness
Date: Tue, 2 Nov 2010 13:27:41 +0900	[thread overview]
Message-ID: <AANLkTim0oHFehpJggt9c8PhSZpOZZA1Qz=h6rC5NjeCY@mail.gmail.com> (raw)
In-Reply-To: <1288668052-32036-1-git-send-email-bgamari.foss@gmail.com>

On Tue, Nov 2, 2010 at 12:20 PM, Ben Gamari <bgamari.foss@gmail.com> wrote:
> This will allow distributions to tune this important vm parameter in a more
> self-contained manner.
>
> Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> Acked-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
>  Documentation/sysctl/vm.txt |    2 +-
>  mm/Kconfig                  |   14 ++++++++++++++
>  mm/vmscan.c                 |    2 +-
>  3 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
> index 30289fa..d159d02 100644
> --- a/Documentation/sysctl/vm.txt
> +++ b/Documentation/sysctl/vm.txt
> @@ -643,7 +643,7 @@ This control is used to define how aggressive the kernel will swap
>  memory pages.  Higher values will increase agressiveness, lower values
>  decrease the amount of swap.
>
> -The default value is 60.
> +The default value is 60 (changed with CONFIG_DEFAULT_SWAPINESS).
>
>  ==============================================================
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index c2c8a4a..dc23737 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -61,6 +61,20 @@ config SPARSEMEM_MANUAL
>
>  endchoice
>
> +config DEFAULT_SWAPPINESS
> +       int "Default swappiness"
> +       default "60"
> +       range 0 100
> +       help
> +         This control is used to define how aggressive the kernel will swap
> +         memory pages.  Higher values will increase agressiveness, lower
> +         values decrease the amount of swap. Valid values range from 0 to 100.
> +
> +         This only sets the default value at boot. Swappiness can be set at
> +         runtime through /proc/sys/vm/swappiness.
> +
> +         If unsure, keep default value of 60.
> +
>  config DISCONTIGMEM
>        def_bool y
>        depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index b8a6fdc..d9f5bba 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -133,7 +133,7 @@ struct scan_control {
>  /*
>  * From 0 .. 100.  Higher means more swappy.
>  */
> -int vm_swappiness = 60;
> +int vm_swappiness = CONFIG_DEFAULT_SWAPPINESS;
>  long vm_total_pages;   /* The total number of pages which the VM controls */
>
>  static LIST_HEAD(shrinker_list);

Apparently, it wouldn't hurt maintain the kernel. But I have a concern.
As someone think this parameter is very important and would be better
to control by kernel config rather than init script to make the
package, it would make new potential kernel configs by someone in
future.
But I can't convince my opinion myself. Because if there will be lots
of kernel config for tuning parameters, could it hurt
maintain/usability? I can't say "Yes" strongly. so I am not against
this idea strongly.
Hmm,,  Just pass the decision to others.

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-11-02  4:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02  3:20 Ben Gamari
2010-11-02  3:33 ` David Rientjes
2010-11-02 12:58   ` Ben Gamari
2010-11-02 14:01     ` Wu Fengguang
2010-11-03 14:33       ` Dave Jones
2010-11-04  2:40         ` Ben Gamari
2010-11-04  3:09       ` Ben Gamari
2010-11-02 14:34     ` Hiroyuki Kamezawa
2010-11-04  2:44       ` Ben Gamari
2010-11-02 19:39     ` David Rientjes
2010-11-04  3:13       ` Ben Gamari
2010-11-02  4:14 ` Jesper Juhl
2010-11-02  4:27 ` Minchan Kim [this message]
2010-11-02 12:47   ` Hiroyuki Kamezawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTim0oHFehpJggt9c8PhSZpOZZA1Qz=h6rC5NjeCY@mail.gmail.com' \
    --to=minchan.kim@gmail.com \
    --cc=bgamari.foss@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=jj@chaosbits.net \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox