From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 0/3] Skip I/O merges when disabled
Date: Thu, 24 Apr 2008 16:38:59 -0400 [thread overview]
Message-ID: <4810EFE3.3070607@hp.com> (raw)
In-Reply-To: <20080424070923.GQ12774@kernel.dk>
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
Jens Axboe wrote:
>
> The functionality is fine with me, merging is obviously a non-zero
> amount of cycles spent on IO and if you know it's in vain, may as well
> turn it off. One suggestion, though - if you add this as a performance
> rather than functionality change, I would suggest keeping the one-hit
> cache merge as that is essentially free. Better than free actually,
> since if you hit that merge point you'll be spending way less cycles
> than allocating+setting up a new request.
>
With the patch below we retain the one-hit cache functionality. On a few
by-hand runs I'm seeing not much movement in the numbers (goodness). I'm
going to do a full 25 by 10-minute set of runs, and if things look OK,
I'll submit a new patch stream tomorrow.
Cheers,
Alan
[-- Attachment #2: 0004-Move-merge-skip-until-after-the-one-hit-check.patch --]
[-- Type: text/x-patch, Size: 1276 bytes --]
>From afee0469c6dfc297cc81e38178193aaf0bd3b539 Mon Sep 17 00:00:00 2001
From: Alan D. Brunelle <alan.brunelle@hp.com>
Date: Thu, 24 Apr 2008 16:36:19 -0400
Subject: [PATCH] Move merge skip until after the one-hit check
This undoes patch 2/3, and moves the code to elv_merge after the one-hit
cache check.
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
block/blk-core.c | 2 +-
block/elevator.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 54a2d8b..2a438a9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1115,7 +1115,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
spin_lock_irq(q->queue_lock);
- if (blk_queue_nomerges(q) || unlikely(barrier) || elv_queue_empty(q))
+ if (unlikely(barrier) || elv_queue_empty(q))
goto get_rq;
el_ret = elv_merge(q, &req, bio);
diff --git a/block/elevator.c b/block/elevator.c
index 2a5e4be..557ee38 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -488,6 +488,9 @@ int elv_merge(struct request_queue *q, struct request **req, struct bio *bio)
}
}
+ if (blk_queue_nomerges(q))
+ return ELEVATOR_NO_MERGE;
+
/*
* See if our hash lookup can find a potential backmerge.
*/
--
1.5.2.5
next prev parent reply other threads:[~2008-04-24 20:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 19:08 [RFC][PATCH 0/3] Skip I/O merges when disabled Alan D. Brunelle
2008-04-23 19:12 ` [RFC][PATCH 1/3] Add flag and sysfs interfaces Alan D. Brunelle
2008-04-23 19:14 ` [RFC][PATCH 2/3] Have __make_request skip merges when disabled Alan D. Brunelle
2008-04-23 19:15 ` [RFC][PATCH 3/3] Do not use rqhash when merges disabled Alan D. Brunelle
2008-04-24 0:37 ` Aaron Carroll
2008-04-24 0:59 ` Alan D. Brunelle
2008-04-24 2:07 ` Aaron Carroll
2008-04-24 7:09 ` [RFC][PATCH 0/3] Skip I/O merges when disabled Jens Axboe
2008-04-24 12:09 ` Alan D. Brunelle
2008-04-25 8:38 ` Jens Axboe
2008-04-25 11:17 ` Alan D. Brunelle
2008-04-25 11:25 ` Jens Axboe
2008-04-25 12:06 ` Aaron Carroll
2008-04-25 12:14 ` Jens Axboe
2008-04-25 12:17 ` Alan D. Brunelle
2008-04-28 16:36 ` Alan D. Brunelle
2008-04-29 7:37 ` Jens Axboe
2008-04-24 20:38 ` Alan D. Brunelle [this message]
2008-04-24 13:29 ` Andi Kleen
2008-04-24 13:59 ` Jens Axboe
2008-04-24 14:13 ` Alan D. Brunelle
2008-04-24 15:05 ` Jens Axboe
2008-04-24 22:04 ` Carl Henrik Lunde
2008-04-25 7:13 ` Andi Kleen
2008-04-24 14:15 ` Andi Kleen
2008-04-24 15:04 ` Jens Axboe
2008-04-24 15:53 ` David Collier-Brown
2008-04-24 16:29 ` Alan D. Brunelle
2008-04-24 13:31 ` Alan D. Brunelle
2008-04-24 13:43 ` Alan D. Brunelle
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=4810EFE3.3070607@hp.com \
--to=alan.brunelle@hp.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/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