* [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 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 2:44 [PATCH] block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find majianpeng
-- strict thread matches above, loose matches on Subject: below --
2013-01-07 5:08 majianpeng
2013-01-07 7:54 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox