]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
a block patch for .27 and .28
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 29 Apr 2009 02:03:28 +0000 (19:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 29 Apr 2009 02:03:28 +0000 (19:03 -0700)
queue-2.6.27/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch [new file with mode: 0644]
queue-2.6.27/series
queue-2.6.28/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch [new file with mode: 0644]
queue-2.6.28/series

diff --git a/queue-2.6.27/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch b/queue-2.6.27/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch
new file mode 100644 (file)
index 0000000..2da9631
--- /dev/null
@@ -0,0 +1,70 @@
+From 78f707bfc723552e8309b7c38a8d0cc51012e813 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <jens.axboe@oracle.com>
+Date: Tue, 17 Feb 2009 13:59:08 +0100
+Subject: block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
+
+From: Jens Axboe <jens.axboe@oracle.com>
+
+commit 78f707bfc723552e8309b7c38a8d0cc51012e813 upstream.
+
+The above commit added WRITE_SYNC and switched various places to using
+that for committing writes that will be waited upon immediately after
+submission. However, this causes a performance regression with AS and CFQ
+for ext3 at least, since sync_dirty_buffer() will submit some writes with
+WRITE_SYNC while ext3 has sumitted others dependent writes without the sync
+flag set. This causes excessive anticipation/idling in the IO scheduler
+because sync and async writes get interleaved, causing a big performance
+regression for the below test case (which is meant to simulate sqlite
+like behaviour).
+
+---- test case ----
+
+int main(int argc, char **argv)
+{
+
+       int fdes, i;
+       FILE *fp;
+       struct timeval start;
+       struct timeval end;
+       struct timeval res;
+
+       gettimeofday(&start, NULL);
+       for (i=0; i<ROWS; i++) {
+               fp = fopen("test_file", "a");
+               fprintf(fp, "Some Text Data\n");
+               fdes = fileno(fp);
+               fsync(fdes);
+               fclose(fp);
+       }
+       gettimeofday(&end, NULL);
+
+       timersub(&end, &start, &res);
+       fprintf(stdout, "time to write %d lines is %ld(msec)\n", ROWS,
+                       (res.tv_sec*1000000 + res.tv_usec)/1000);
+
+       return 0;
+}
+
+-------------------
+
+Thanks to Sean.White@APCC.com for tracking down this performance
+regression and providing a test case.
+
+Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/buffer.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/buffer.c
++++ b/fs/buffer.c
+@@ -3042,7 +3042,7 @@ int sync_dirty_buffer(struct buffer_head
+       if (test_clear_buffer_dirty(bh)) {
+               get_bh(bh);
+               bh->b_end_io = end_buffer_write_sync;
+-              ret = submit_bh(WRITE_SYNC, bh);
++              ret = submit_bh(WRITE, bh);
+               wait_on_buffer(bh);
+               if (buffer_eopnotsupp(bh)) {
+                       clear_buffer_eopnotsupp(bh);
index f7330c71b6acc8c3056cbe3c815ac0b92cba0f74..3673e3de5e979ff5e280a2d02c620ba37651faf4 100644 (file)
@@ -39,3 +39,4 @@ net-fix-sctp-breakage.patch
 0093-agp-zero-pages-before-sending-to-userspace.patch
 0096-hugetlbfs-return-negative-error-code-for-bad-mount.patch
 kprobes-fix-locking-imbalance-in-kretprobes.patch
+block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch
diff --git a/queue-2.6.28/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch b/queue-2.6.28/block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch
new file mode 100644 (file)
index 0000000..2da9631
--- /dev/null
@@ -0,0 +1,70 @@
+From 78f707bfc723552e8309b7c38a8d0cc51012e813 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <jens.axboe@oracle.com>
+Date: Tue, 17 Feb 2009 13:59:08 +0100
+Subject: block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
+
+From: Jens Axboe <jens.axboe@oracle.com>
+
+commit 78f707bfc723552e8309b7c38a8d0cc51012e813 upstream.
+
+The above commit added WRITE_SYNC and switched various places to using
+that for committing writes that will be waited upon immediately after
+submission. However, this causes a performance regression with AS and CFQ
+for ext3 at least, since sync_dirty_buffer() will submit some writes with
+WRITE_SYNC while ext3 has sumitted others dependent writes without the sync
+flag set. This causes excessive anticipation/idling in the IO scheduler
+because sync and async writes get interleaved, causing a big performance
+regression for the below test case (which is meant to simulate sqlite
+like behaviour).
+
+---- test case ----
+
+int main(int argc, char **argv)
+{
+
+       int fdes, i;
+       FILE *fp;
+       struct timeval start;
+       struct timeval end;
+       struct timeval res;
+
+       gettimeofday(&start, NULL);
+       for (i=0; i<ROWS; i++) {
+               fp = fopen("test_file", "a");
+               fprintf(fp, "Some Text Data\n");
+               fdes = fileno(fp);
+               fsync(fdes);
+               fclose(fp);
+       }
+       gettimeofday(&end, NULL);
+
+       timersub(&end, &start, &res);
+       fprintf(stdout, "time to write %d lines is %ld(msec)\n", ROWS,
+                       (res.tv_sec*1000000 + res.tv_usec)/1000);
+
+       return 0;
+}
+
+-------------------
+
+Thanks to Sean.White@APCC.com for tracking down this performance
+regression and providing a test case.
+
+Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/buffer.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/buffer.c
++++ b/fs/buffer.c
+@@ -3042,7 +3042,7 @@ int sync_dirty_buffer(struct buffer_head
+       if (test_clear_buffer_dirty(bh)) {
+               get_bh(bh);
+               bh->b_end_io = end_buffer_write_sync;
+-              ret = submit_bh(WRITE_SYNC, bh);
++              ret = submit_bh(WRITE, bh);
+               wait_on_buffer(bh);
+               if (buffer_eopnotsupp(bh)) {
+                       clear_buffer_eopnotsupp(bh);
index c44e43279311f5d8a8b50ffb0bc49bc433232120..9f85c5dfafa7208b87687cf8f1a5eef75d2bb418 100644 (file)
@@ -50,3 +50,4 @@ kprobes-fix-locking-imbalance-in-kretprobes.patch
 0024-r8169-Reset-IntrStatus-after-chip-reset.patch
 0093-agp-zero-pages-before-sending-to-userspace.patch
 0096-hugetlbfs-return-negative-error-code-for-bad-mount.patch
+block-revert-part-of-18ce3751ccd488c78d3827e9f6bf54e6322676fb.patch