[pve-devel] r5237 - pve-kernel-2.6.35/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Thu Oct 7 15:43:06 CEST 2010
Author: dietmar
Date: 2010-10-07 13:43:06 +0000 (Thu, 07 Oct 2010)
New Revision: 5237
Added:
pve-kernel-2.6.35/trunk/sched-fix.diff
Removed:
pve-kernel-2.6.35/trunk/fsync-perf-fix.patch
Modified:
pve-kernel-2.6.35/trunk/Makefile
pve-kernel-2.6.35/trunk/changelog.Debian
Log:
Modified: pve-kernel-2.6.35/trunk/Makefile
===================================================================
--- pve-kernel-2.6.35/trunk/Makefile 2010-10-07 13:20:04 UTC (rev 5236)
+++ pve-kernel-2.6.35/trunk/Makefile 2010-10-07 13:43:06 UTC (rev 5237)
@@ -108,7 +108,7 @@
cd ${KERNEL_SRC}; patch -p1 <../bridge-patch.diff
cd ${KERNEL_SRC}; patch -p1 <../scst-src/scst/kernel/scst_exec_req_fifo-2.6.35.patch
cd ${KERNEL_SRC}; patch -p1 <../scst-src/iscsi-scst/kernel/patches/put_page_callback-2.6.35.patch
- cd ${KERNEL_SRC}; patch -p1 <../fsync-perf-fix.patch
+ cd ${KERNEL_SRC}; patch -p1 <../sched-fix.diff
sed -i ${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
touch $@
Modified: pve-kernel-2.6.35/trunk/changelog.Debian
===================================================================
--- pve-kernel-2.6.35/trunk/changelog.Debian 2010-10-07 13:20:04 UTC (rev 5236)
+++ pve-kernel-2.6.35/trunk/changelog.Debian 2010-10-07 13:43:06 UTC (rev 5237)
@@ -1,6 +1,6 @@
pve-kernel-2.6.35 (2.6.35-3) unstable; urgency=low
- * fix fsync performance: fsync-perf-fix.patch
+ * fix fsync performance: sched-fix.diff
* strip debug symbols
Deleted: pve-kernel-2.6.35/trunk/fsync-perf-fix.patch
===================================================================
--- pve-kernel-2.6.35/trunk/fsync-perf-fix.patch 2010-10-07 13:20:04 UTC (rev 5236)
+++ pve-kernel-2.6.35/trunk/fsync-perf-fix.patch 2010-10-07 13:43:06 UTC (rev 5237)
@@ -1,106 +0,0 @@
-From: Corrado Zoccolo <czoccolo at gmail.com>
-Date: Mon, 20 Sep 2010 13:24:50 +0000 (+0200)
-Subject: cfq: improve fsync performance for small files
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Faxboe%2Flinux-2.6-block.git;a=commitdiff_plain;h=749ef9f8423054e326f3a246327ed2db4b6d395f
-
-cfq: improve fsync performance for small files
-
-Fsync performance for small files achieved by cfq on high-end disks is
-lower than what deadline can achieve, due to idling introduced between
-the sync write happening in process context and the journal commit.
-
-Moreover, when competing with a sequential reader, a process writing
-small files and fsync-ing them is starved.
-
-This patch fixes the two problems by:
-- marking journal commits as WRITE_SYNC, so that they get the REQ_NOIDLE
- flag set,
-- force all queues that have REQ_NOIDLE requests to be put in the noidle
- tree.
-
-Having the queue associated to the fsync-ing process and the one associated
- to journal commits in the noidle tree allows:
-- switching between them without idling,
-- fairness vs. competing idling queues, since they will be serviced only
- after the noidle tree expires its slice.
-
-Acked-by: Vivek Goyal <vgoyal at redhat.com>
-Reviewed-by: Jeff Moyer <jmoyer at redhat.com>
-Tested-by: Jeff Moyer <jmoyer at redhat.com>
-Signed-off-by: Corrado Zoccolo <czoccolo at gmail.com>
-Signed-off-by: Jens Axboe <jaxboe at fusionio.com>
----
-
-diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
-index b9f8619..6845926 100644
---- a/block/cfq-iosched.c
-+++ b/block/cfq-iosched.c
-@@ -216,7 +216,6 @@ struct cfq_data {
- enum wl_type_t serving_type;
- unsigned long workload_expires;
- struct cfq_group *serving_group;
-- bool noidle_tree_requires_idle;
-
- /*
- * Each priority tree is sorted by next_request position. These
-@@ -2126,7 +2125,6 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
- slice = max_t(unsigned, slice, CFQ_MIN_TT);
- cfq_log(cfqd, "workload slice:%d", slice);
- cfqd->workload_expires = jiffies + slice;
-- cfqd->noidle_tree_requires_idle = false;
- }
-
- static struct cfq_group *cfq_get_next_cfqg(struct cfq_data *cfqd)
-@@ -3108,7 +3106,9 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
- if (cfqq->queued[0] + cfqq->queued[1] >= 4)
- cfq_mark_cfqq_deep(cfqq);
-
-- if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle ||
-+ if (cfqq->next_rq && (cfqq->next_rq->cmd_flags & REQ_NOIDLE))
-+ enable_idle = 0;
-+ else if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle ||
- (!cfq_cfqq_deep(cfqq) && CFQQ_SEEKY(cfqq)))
- enable_idle = 0;
- else if (sample_valid(cic->ttime_samples)) {
-@@ -3333,14 +3333,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
- else if (sync && cfqq_empty &&
- !cfq_close_cooperator(cfqd, cfqq)) {
- cfqd->noidle_tree_requires_idle |= !rq_noidle(rq);
-- /*
-- * Idling is enabled for SYNC_WORKLOAD.
-- * SYNC_NOIDLE_WORKLOAD idles at the end of the tree
-- * only if we processed at least one !rq_noidle request
-- */
-- if (cfqd->serving_type == SYNC_WORKLOAD
-- || cfqd->noidle_tree_requires_idle
-- || cfqq->cfqg->nr_cfqq == 1)
-+ if (cfqd->noidle_tree_requires_idle)
- cfq_arm_slice_timer(cfqd);
- }
- }
-diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
-index 95d8c11..3f030e9 100644
---- a/fs/jbd/commit.c
-+++ b/fs/jbd/commit.c
-@@ -318,7 +318,7 @@ void journal_commit_transaction(journal_t *journal)
- int first_tag = 0;
- int tag_flag;
- int i;
-- int write_op = WRITE;
-+ int write_op = WRITE_SYNC;
-
- /*
- * First job: lock down the current transaction and wait for
-diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
-index 7c068c1..80910f5 100644
---- a/fs/jbd2/commit.c
-+++ b/fs/jbd2/commit.c
-@@ -360,7 +360,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
- int tag_bytes = journal_tag_bytes(journal);
- struct buffer_head *cbh = NULL; /* For transactional checksums */
- __u32 crc32_sum = ~0;
-- int write_op = WRITE;
-+ int write_op = WRITE_SYNC;
-
- /*
- * First job: lock down the current transaction and wait for
Added: pve-kernel-2.6.35/trunk/sched-fix.diff
===================================================================
--- pve-kernel-2.6.35/trunk/sched-fix.diff (rev 0)
+++ pve-kernel-2.6.35/trunk/sched-fix.diff 2010-10-07 13:43:06 UTC (rev 5237)
@@ -0,0 +1,45 @@
+cfq-iosched: do not force idling for sync workload
+
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+
+revert v2.6.32-108-gc04645e
+blkio: Wait on sync-noidle queue even if rq_noidle = 1
+by Vivek Goyal <vgoyal at redhat.com>
+
+and piece of v2.6.32-rc5-486-g8e55063
+cfq-iosched: fix corner cases in idling logic
+by Corrado Zoccolo <czoccolo at gmail.com>
+
+
+fix perfomance degradation for massive write-fsync pattern:
+# sysbench --test=fileio --file-num=1 --file-total-size=1G --file-fsync-all=on \
+--file-test-mode=seqwr --max-time=10 --file-block-size=4096 --max-requests=0 run
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1622
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+---
+
+ block/cfq-iosched.c | 9 +--------
+ 1 files changed, 1 insertions(+), 8 deletions(-)
+
+diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
+index 023f4e6..b68b633 100644
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -3333,14 +3333,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
+ else if (sync && cfqq_empty &&
+ !cfq_close_cooperator(cfqd, cfqq)) {
+ cfqd->noidle_tree_requires_idle |= !rq_noidle(rq);
+- /*
+- * Idling is enabled for SYNC_WORKLOAD.
+- * SYNC_NOIDLE_WORKLOAD idles at the end of the tree
+- * only if we processed at least one !rq_noidle request
+- */
+- if (cfqd->serving_type == SYNC_WORKLOAD
+- || cfqd->noidle_tree_requires_idle
+- || cfqq->cfqg->nr_cfqq == 1)
++ if (cfqd->noidle_tree_requires_idle)
+ cfq_arm_slice_timer(cfqd);
+ }
+ }
More information about the pve-devel
mailing list