public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Cc: Bill Davidsen <davidsen@tmr.com>,
	yumiko.sugita.yf@hitachi.com, masami.hiramatsu.pt@hitachi.com,
	hidehiro.kawai.ez@hitachi.com, yuji.kakutani.uw@hitachi.com,
	soshima@redhat.com, haoki@redhat.com
Subject: [PATCH 2/2] VM throttling: Add vm.dirty_start_writeback_ratio to sysctl
Date: Tue, 03 Apr 2007 19:47:17 +0900	[thread overview]
Message-ID: <461230B5.8000807@hitachi.com> (raw)
In-Reply-To: <4607FECD.1090101@tmr.com>

This patch adds a sysctl variable `vm.dirty_start_writeback_ratio' to
enable users to adjust the writeback starting level of the dirty pages.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
---
 Documentation/filesystems/proc.txt |   11 +++++++++--
 Documentation/sysctl/vm.txt        |    3 ++-
 kernel/sysctl.c                    |   11 +++++++++++
 3 files changed, 22 insertions(+), 3 deletions(-)

Index: linux-2.6.21-rc5-mm3-writeback/Documentation/filesystems/proc.txt
===================================================================
--- linux-2.6.21-rc5-mm3-writeback.orig/Documentation/filesystems/proc.txt
+++ linux-2.6.21-rc5-mm3-writeback/Documentation/filesystems/proc.txt
@@ -1170,13 +1170,20 @@ dirty_background_ratio
 Contains, as a percentage of total system memory, the number of pages at which
 the pdflush background writeback daemon will start writing out dirty data.

-dirty_ratio
------------------
+dirty_writeback_start_ratio
+---------------------------

 Contains, as a percentage of total system memory, the number of pages at which
 a process which is generating disk writes will itself start writing out dirty
 data.

+dirty_ratio
+-----------------
+
+Contains, as a percentage of total system memory, the number of pages at which
+a process which is generating disk writes will be blocked untill the level
+subsides.
+
 dirty_writeback_centisecs
 -------------------------

Index: linux-2.6.21-rc5-mm3-writeback/Documentation/sysctl/vm.txt
===================================================================
--- linux-2.6.21-rc5-mm3-writeback.orig/Documentation/sysctl/vm.txt
+++ linux-2.6.21-rc5-mm3-writeback/Documentation/sysctl/vm.txt
@@ -19,6 +19,7 @@ Currently, these files are in /proc/sys/
 - overcommit_memory
 - page-cluster
 - dirty_ratio
+- dirty_start_writeback_ratio
 - dirty_background_ratio
 - dirty_expire_centisecs
 - dirty_writeback_centisecs
@@ -40,7 +41,7 @@ Currently, these files are in /proc/sys/
 dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
 dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
 block_dump, swap_token_timeout, drop-caches,
-hugepages_treat_as_movable:
+hugepages_treat_as_movable, dirty_start_writeback_ratio:

 See Documentation/filesystems/proc.txt

Index: linux-2.6.21-rc5-mm3-writeback/kernel/sysctl.c
===================================================================
--- linux-2.6.21-rc5-mm3-writeback.orig/kernel/sysctl.c
+++ linux-2.6.21-rc5-mm3-writeback/kernel/sysctl.c
@@ -708,6 +708,17 @@ static ctl_table vm_table[] = {
 		.extra2		= &one_hundred,
 	},
 	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "dirty_start_writeback_ratio",
+		.data		= &dirty_start_writeback_ratio,
+		.maxlen		= sizeof(dirty_start_writeback_ratio),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &zero,
+		.extra2		= &one_hundred,
+	},
+	{
 		.ctl_name	= VM_DIRTY_WB_CS,
 		.procname	= "dirty_writeback_centisecs",
 		.data		= &dirty_writeback_interval,

      parent reply	other threads:[~2007-04-03 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 12:42 [PATCH 0/3] VM throttling: avoid blocking occasional writers Tomoki Sekiyama
2007-03-14 13:18 ` Peter Zijlstra
2007-03-15 19:07 ` Andrew Morton
2007-03-18 14:59   ` Bill Davidsen
2007-03-22  5:49     ` Tomoki Sekiyama
2007-03-22 11:41       ` Bill Davidsen
2007-03-26 10:27         ` Tomoki Sekiyama
2007-03-26 17:11           ` Bill Davidsen
2007-04-03 10:42             ` Tomoki Sekiyama
2007-04-03 10:46             ` [PATCH 1/2] VM throttling: Start writeback at dirty_writeback_start_ratio Tomoki Sekiyama
2007-04-06  0:31               ` Andrew Morton
2007-04-10  3:04                 ` Tomoki Sekiyama
2007-04-10  3:46                   ` Andrew Morton
2007-04-03 10:47             ` Tomoki Sekiyama [this message]

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=461230B5.8000807@hitachi.com \
    --to=tomoki.sekiyama.qu@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidsen@tmr.com \
    --cc=haoki@redhat.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=soshima@redhat.com \
    --cc=yuji.kakutani.uw@hitachi.com \
    --cc=yumiko.sugita.yf@hitachi.com \
    /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