All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20090831030815.GD20822@mit.edu>

diff --git a/a/1.txt b/N1/1.txt
index 8fe6de0..1318578 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -51,124 +51,3 @@ won't try to trace it down now; plus which it's your code so I figure
 you can probably figure it out faster....
 
      	     	       	    	    	       	  - Ted
-
->From 763fb19b3d14d73e71f5d88bd3b5f56869536ae5 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Sun, 30 Aug 2009 23:06:24 -0400
-Subject: [PATCH] vm: Add an tuning knob for vm.max_writeback_pages
-
-Originally, MAX_WRITEBACK_PAGES was hard-coded to 1024 because of a
-concern of not holding I_SYNC for too long.  (At least, that was the
-comment previously.)  This doesn't make sense now because the only
-time we wait for I_SYNC is if we are calling sync or fsync, and in
-that case we need to write out all of the data anyway.  Previously
-there may have been other code paths that waited on I_SYNC, but not
-any more.
-
-According to Christoph, the current writeback size is way too small,
-and XFS had a hack that bumped out nr_to_write to four times the value
-sent by the VM to be able to saturate medium-sized RAID arrays.  This
-value was also problematic for ext4 as well, as it caused large files
-to be come interleaved on disk by in 8 megabyte chunks (we bumped up
-the nr_to_write by a factor of two).
-
-So, in this patch, we make the MAX_WRITEBACK_PAGES a tunable, and
-change the default to be 32768 blocks.
-
-http://bugzilla.kernel.org/show_bug.cgi?id=13930
-
-Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
----
-This patch is designed to be applied  on top of the per-bdi v13 patchset
-
- fs/fs-writeback.c         |   15 +++------------
- include/linux/writeback.h |    1 +
- kernel/sysctl.c           |    8 ++++++++
- mm/page-writeback.c       |    6 ++++++
- 4 files changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
-index dfb4767..7e66de7 100644
---- a/fs/fs-writeback.c
-+++ b/fs/fs-writeback.c
-@@ -264,15 +264,6 @@ void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb,
- 	}
- }
- 
--/*
-- * The maximum number of pages to writeout in a single bdi flush/kupdate
-- * operation.  We do this so we don't hold I_SYNC against an inode for
-- * enormous amounts of time, which would block a userspace task which has
-- * been forced to throttle against that inode.  Also, the code reevaluates
-- * the dirty each time it has written this many pages.
-- */
--#define MAX_WRITEBACK_PAGES     1024
--
- static inline bool over_bground_thresh(void)
- {
- 	unsigned long background_thresh, dirty_thresh;
-@@ -325,11 +316,11 @@ static long wb_writeback(struct bdi_writeback *wb, long nr_pages,
- 
- 		wbc.more_io = 0;
- 		wbc.encountered_congestion = 0;
--		wbc.nr_to_write = MAX_WRITEBACK_PAGES;
-+		wbc.nr_to_write = max_writeback_pages;
- 		wbc.pages_skipped = 0;
- 		generic_sync_wb_inodes(wb, sb, &wbc);
--		nr_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
--		wrote += MAX_WRITEBACK_PAGES - wbc.nr_to_write;
-+		nr_pages -= max_writeback_pages - wbc.nr_to_write;
-+		wrote += max_writeback_pages - wbc.nr_to_write;
- 		/*
- 		 * If we ran out of stuff to write, bail unless more_io got set
- 		 */
-diff --git a/include/linux/writeback.h b/include/linux/writeback.h
-index e070b91..a27fc00 100644
---- a/include/linux/writeback.h
-+++ b/include/linux/writeback.h
-@@ -100,6 +100,7 @@ extern int vm_dirty_ratio;
- extern unsigned long vm_dirty_bytes;
- extern unsigned int dirty_writeback_interval;
- extern unsigned int dirty_expire_interval;
-+extern unsigned int max_writeback_pages;
- extern int vm_highmem_is_dirtyable;
- extern int block_dump;
- extern int laptop_mode;
-diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index 58be760..06d1c4c 100644
---- a/kernel/sysctl.c
-+++ b/kernel/sysctl.c
-@@ -1104,6 +1104,14 @@ static struct ctl_table vm_table[] = {
- 		.proc_handler	= &proc_dointvec,
- 	},
- 	{
-+		.ctl_name	= CTL_UNNUMBERED,
-+		.procname	= "max_writeback_pages",
-+		.data		= &max_writeback_pages,
-+		.maxlen		= sizeof(max_writeback_pages),
-+		.mode		= 0644,
-+		.proc_handler	= &proc_dointvec,
-+	},
-+	{
- 		.ctl_name	= VM_NR_PDFLUSH_THREADS,
- 		.procname	= "nr_pdflush_threads",
- 		.data		= &nr_pdflush_threads,
-diff --git a/mm/page-writeback.c b/mm/page-writeback.c
-index a727af9..46fe54f 100644
---- a/mm/page-writeback.c
-+++ b/mm/page-writeback.c
-@@ -55,6 +55,12 @@ static inline long sync_writeback_pages(void)
- /* The following parameters are exported via /proc/sys/vm */
- 
- /*
-+ * The maximum number of pages to write out in a single bdflush/kupdate
-+ * operation.
-+ */
-+unsigned int max_writeback_pages = 32768;
-+
-+/*
-  * Start background writeback (via pdflush) at this percentage
-  */
- int dirty_background_ratio = 10;
--- 
-1.6.3.2.1.gb9f7d.dirty
diff --git a/a/content_digest b/N1/content_digest
index 20ebb08..d0abee5 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -65,127 +65,6 @@
  "won't try to trace it down now; plus which it's your code so I figure\n"
  "you can probably figure it out faster....\n"
  "\n"
- "     \t     \t       \t    \t    \t       \t  - Ted\n"
- "\n"
- ">From 763fb19b3d14d73e71f5d88bd3b5f56869536ae5 Mon Sep 17 00:00:00 2001\n"
- "From: Theodore Ts'o <tytso@mit.edu>\n"
- "Date: Sun, 30 Aug 2009 23:06:24 -0400\n"
- "Subject: [PATCH] vm: Add an tuning knob for vm.max_writeback_pages\n"
- "\n"
- "Originally, MAX_WRITEBACK_PAGES was hard-coded to 1024 because of a\n"
- "concern of not holding I_SYNC for too long.  (At least, that was the\n"
- "comment previously.)  This doesn't make sense now because the only\n"
- "time we wait for I_SYNC is if we are calling sync or fsync, and in\n"
- "that case we need to write out all of the data anyway.  Previously\n"
- "there may have been other code paths that waited on I_SYNC, but not\n"
- "any more.\n"
- "\n"
- "According to Christoph, the current writeback size is way too small,\n"
- "and XFS had a hack that bumped out nr_to_write to four times the value\n"
- "sent by the VM to be able to saturate medium-sized RAID arrays.  This\n"
- "value was also problematic for ext4 as well, as it caused large files\n"
- "to be come interleaved on disk by in 8 megabyte chunks (we bumped up\n"
- "the nr_to_write by a factor of two).\n"
- "\n"
- "So, in this patch, we make the MAX_WRITEBACK_PAGES a tunable, and\n"
- "change the default to be 32768 blocks.\n"
- "\n"
- "http://bugzilla.kernel.org/show_bug.cgi?id=13930\n"
- "\n"
- "Signed-off-by: \"Theodore Ts'o\" <tytso@mit.edu>\n"
- "---\n"
- "This patch is designed to be applied  on top of the per-bdi v13 patchset\n"
- "\n"
- " fs/fs-writeback.c         |   15 +++------------\n"
- " include/linux/writeback.h |    1 +\n"
- " kernel/sysctl.c           |    8 ++++++++\n"
- " mm/page-writeback.c       |    6 ++++++\n"
- " 4 files changed, 18 insertions(+), 12 deletions(-)\n"
- "\n"
- "diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c\n"
- "index dfb4767..7e66de7 100644\n"
- "--- a/fs/fs-writeback.c\n"
- "+++ b/fs/fs-writeback.c\n"
- "@@ -264,15 +264,6 @@ void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb,\n"
- " \t}\n"
- " }\n"
- " \n"
- "-/*\n"
- "- * The maximum number of pages to writeout in a single bdi flush/kupdate\n"
- "- * operation.  We do this so we don't hold I_SYNC against an inode for\n"
- "- * enormous amounts of time, which would block a userspace task which has\n"
- "- * been forced to throttle against that inode.  Also, the code reevaluates\n"
- "- * the dirty each time it has written this many pages.\n"
- "- */\n"
- "-#define MAX_WRITEBACK_PAGES     1024\n"
- "-\n"
- " static inline bool over_bground_thresh(void)\n"
- " {\n"
- " \tunsigned long background_thresh, dirty_thresh;\n"
- "@@ -325,11 +316,11 @@ static long wb_writeback(struct bdi_writeback *wb, long nr_pages,\n"
- " \n"
- " \t\twbc.more_io = 0;\n"
- " \t\twbc.encountered_congestion = 0;\n"
- "-\t\twbc.nr_to_write = MAX_WRITEBACK_PAGES;\n"
- "+\t\twbc.nr_to_write = max_writeback_pages;\n"
- " \t\twbc.pages_skipped = 0;\n"
- " \t\tgeneric_sync_wb_inodes(wb, sb, &wbc);\n"
- "-\t\tnr_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;\n"
- "-\t\twrote += MAX_WRITEBACK_PAGES - wbc.nr_to_write;\n"
- "+\t\tnr_pages -= max_writeback_pages - wbc.nr_to_write;\n"
- "+\t\twrote += max_writeback_pages - wbc.nr_to_write;\n"
- " \t\t/*\n"
- " \t\t * If we ran out of stuff to write, bail unless more_io got set\n"
- " \t\t */\n"
- "diff --git a/include/linux/writeback.h b/include/linux/writeback.h\n"
- "index e070b91..a27fc00 100644\n"
- "--- a/include/linux/writeback.h\n"
- "+++ b/include/linux/writeback.h\n"
- "@@ -100,6 +100,7 @@ extern int vm_dirty_ratio;\n"
- " extern unsigned long vm_dirty_bytes;\n"
- " extern unsigned int dirty_writeback_interval;\n"
- " extern unsigned int dirty_expire_interval;\n"
- "+extern unsigned int max_writeback_pages;\n"
- " extern int vm_highmem_is_dirtyable;\n"
- " extern int block_dump;\n"
- " extern int laptop_mode;\n"
- "diff --git a/kernel/sysctl.c b/kernel/sysctl.c\n"
- "index 58be760..06d1c4c 100644\n"
- "--- a/kernel/sysctl.c\n"
- "+++ b/kernel/sysctl.c\n"
- "@@ -1104,6 +1104,14 @@ static struct ctl_table vm_table[] = {\n"
- " \t\t.proc_handler\t= &proc_dointvec,\n"
- " \t},\n"
- " \t{\n"
- "+\t\t.ctl_name\t= CTL_UNNUMBERED,\n"
- "+\t\t.procname\t= \"max_writeback_pages\",\n"
- "+\t\t.data\t\t= &max_writeback_pages,\n"
- "+\t\t.maxlen\t\t= sizeof(max_writeback_pages),\n"
- "+\t\t.mode\t\t= 0644,\n"
- "+\t\t.proc_handler\t= &proc_dointvec,\n"
- "+\t},\n"
- "+\t{\n"
- " \t\t.ctl_name\t= VM_NR_PDFLUSH_THREADS,\n"
- " \t\t.procname\t= \"nr_pdflush_threads\",\n"
- " \t\t.data\t\t= &nr_pdflush_threads,\n"
- "diff --git a/mm/page-writeback.c b/mm/page-writeback.c\n"
- "index a727af9..46fe54f 100644\n"
- "--- a/mm/page-writeback.c\n"
- "+++ b/mm/page-writeback.c\n"
- "@@ -55,6 +55,12 @@ static inline long sync_writeback_pages(void)\n"
- " /* The following parameters are exported via /proc/sys/vm */\n"
- " \n"
- " /*\n"
- "+ * The maximum number of pages to write out in a single bdflush/kupdate\n"
- "+ * operation.\n"
- "+ */\n"
- "+unsigned int max_writeback_pages = 32768;\n"
- "+\n"
- "+/*\n"
- "  * Start background writeback (via pdflush) at this percentage\n"
- "  */\n"
- " int dirty_background_ratio = 10;\n"
- "-- \n"
- 1.6.3.2.1.gb9f7d.dirty
+ "     \t     \t       \t    \t    \t       \t  - Ted"
 
-79ba2159feaa2c05d33ea6274449400e2cd95cb111b3bc17ab7e9fab417262c1
+7a64adb6c2b28d018bc98fe3590e577ec78f4228c4886e46e7a776779b17965a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.