* [PATCH] CFQ: clear wait_request flag if needed
@ 2009-08-21 1:52 Gui Jianfeng
2009-08-21 13:36 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Gui Jianfeng @ 2009-08-21 1:52 UTC (permalink / raw)
To: Jens Axboe, linux-kernel
Hi Jens,
IMHO wait_request flag should be cleared if a request goes in
and idle timer needs to shut down. Otherwise, it will walk into
that path every time when a request is enqueued.
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
block/cfq-iosched.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index fd7080e..67f1910 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2093,6 +2093,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE ||
cfqd->busy_queues > 1) {
del_timer(&cfqd->idle_slice_timer);
+ cfq_clear_cfqq_wait_request(cfqq);
__blk_run_queue(cfqd->queue);
}
cfq_mark_cfqq_must_dispatch(cfqq);
--
1.5.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] CFQ: clear wait_request flag if needed
2009-08-21 1:52 [PATCH] CFQ: clear wait_request flag if needed Gui Jianfeng
@ 2009-08-21 13:36 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-08-21 13:36 UTC (permalink / raw)
To: Gui Jianfeng; +Cc: linux-kernel
On Fri, Aug 21 2009, Gui Jianfeng wrote:
> Hi Jens,
>
> IMHO wait_request flag should be cleared if a request goes in
> and idle timer needs to shut down. Otherwise, it will walk into
> that path every time when a request is enqueued.
That looks correct, deletion of the timer should always be paired with
the clearing of that flag. Applied, thanks!
>
> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
> block/cfq-iosched.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index fd7080e..67f1910 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -2093,6 +2093,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
> if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE ||
> cfqd->busy_queues > 1) {
> del_timer(&cfqd->idle_slice_timer);
> + cfq_clear_cfqq_wait_request(cfqq);
> __blk_run_queue(cfqd->queue);
> }
> cfq_mark_cfqq_must_dispatch(cfqq);
> --
> 1.5.4.rc3
>
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-21 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-21 1:52 [PATCH] CFQ: clear wait_request flag if needed Gui Jianfeng
2009-08-21 13:36 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).