[PATCH 2/3] writeback: introduce dirty_volatile_interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduce dirty_volatile_interval for the minimal dirty time.
Inodes dirtied less than dirty_volatile_interval will not be
considered for syncing by kupdate-style writeback.

This new parameter will be used in clustered writeback.
The old dirty_expire_interval is still(but less) respected.

Cc: Chris Mason <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: David Chinner <[email protected]>
Cc: Ken Chen <[email protected]>
Cc: Michael Rubin <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
---
 include/linux/writeback.h |    1 +
 kernel/sysctl.c           |    7 +++++++
 mm/page-writeback.c       |    5 +++++
 3 files changed, 13 insertions(+)

--- linux-2.6.23-rc3-mm1.orig/include/linux/writeback.h
+++ linux-2.6.23-rc3-mm1/include/linux/writeback.h
@@ -101,6 +101,7 @@ extern int dirty_background_ratio;
 extern int vm_dirty_ratio;
 extern int dirty_writeback_interval;
 extern int dirty_expire_interval;
+extern int dirty_volatile_interval;
 extern int block_dump;
 extern int laptop_mode;
 
--- linux-2.6.23-rc3-mm1.orig/mm/page-writeback.c
+++ linux-2.6.23-rc3-mm1/mm/page-writeback.c
@@ -85,6 +85,11 @@ int dirty_writeback_interval = 5 * HZ;
 int dirty_expire_interval = 30 * HZ;
 
 /*
+ * The shortest number of jiffies for which data should remain dirty
+ */
+int dirty_volatile_interval = 5 * HZ;
+
+/*
  * Flag that makes the machine dump writes/reads and block dirtyings.
  */
 int block_dump;
--- linux-2.6.23-rc3-mm1.orig/kernel/sysctl.c
+++ linux-2.6.23-rc3-mm1/kernel/sysctl.c
@@ -837,6 +837,13 @@ static struct ctl_table vm_table[] = {
 		.proc_handler	= &proc_dointvec_userhz_jiffies,
 	},
 	{
+		.procname	= "dirty_volatile_centisecs",
+		.data		= &dirty_volatile_interval,
+		.maxlen		= sizeof(dirty_volatile_interval),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_userhz_jiffies,
+	},
+	{
 		.ctl_name	= VM_NR_PDFLUSH_THREADS,
 		.procname	= "nr_pdflush_threads",
 		.data		= &nr_pdflush_threads,

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux