public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find.
@ 2013-01-07  2:44 majianpeng
  0 siblings, 0 replies; 3+ messages in thread
From: majianpeng @ 2013-01-07  2:44 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 869 bytes --]

Because only mergeable rq can add rqhash.So it does not make sense to
judge rq_mergeable(rq) in func elv_rqhash_find.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 block/elevator.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index 9edba1b..d5901a4 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -273,11 +273,6 @@ static struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
 	hlist_for_each_entry_safe(rq, entry, next, hash_list, hash) {
 		BUG_ON(!ELV_ON_HASH(rq));
 
-		if (unlikely(!rq_mergeable(rq))) {
-			__elv_rqhash_del(rq);
-			continue;
-		}
-
 		if (rq_hash_key(rq) == offset)
 			return rq;
 	}
-- 
1.7.9.5
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find.
@ 2013-01-07  5:08 majianpeng
  2013-01-07  7:54 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: majianpeng @ 2013-01-07  5:08 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 868 bytes --]

Because only mergeable rq can add rqhash.So it does not make sense to
judge rq_mergeable(rq) in func elv_rqhash_find.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 block/elevator.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index 9edba1b..d5901a4 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -273,11 +273,6 @@ static struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
 	hlist_for_each_entry_safe(rq, entry, next, hash_list, hash) {
 		BUG_ON(!ELV_ON_HASH(rq));
 
-		if (unlikely(!rq_mergeable(rq))) {
-			__elv_rqhash_del(rq);
-			continue;
-		}
-
 		if (rq_hash_key(rq) == offset)
 			return rq;
 	}
-- 
1.7.9.5ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find.
  2013-01-07  5:08 [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find majianpeng
@ 2013-01-07  7:54 ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2013-01-07  7:54 UTC (permalink / raw)
  To: majianpeng; +Cc: linux-kernel

On 2013-01-07 06:08, majianpeng wrote:
> Because only mergeable rq can add rqhash.So it does not make sense to
> judge rq_mergeable(rq) in func elv_rqhash_find.

It does make sense. A request is always mergeable when it enters the
hash, but it may not remain mergeable. This can happen if we merge it to
its maximum size, for instance.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-07  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07  5:08 [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find majianpeng
2013-01-07  7:54 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2013-01-07  2:44 majianpeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox