lkml.org 
[lkml]   [2009]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] CFQ: mark must_alloc flag when a cfqq doesn't allocate any request
Hi Jens,

CFQ judges whether must_alloc flag is set, but never marks this flag.
This patch set must_alloc flag when there is no request allocated by
a cfqq. This change ensures cfqq will get at least one request even
if the queue is full.
Hope it helps.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
block/cfq-iosched.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index fd7080e..531a404 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2279,6 +2279,9 @@ static void cfq_put_request(struct request *rq)
BUG_ON(!cfqq->allocated[rw]);
cfqq->allocated[rw]--;

+ if (!(cfqq->allocated[0] + cfqq->allocated[1]))
+ cfq_mark_cfqq_must_alloc(cfqq);
+
put_io_context(RQ_CIC(rq)->ioc);

rq->elevator_private = NULL;
--
1.5.4.rc3



\
 
 \ /
  Last update: 2009-08-07 04:39    [W:0.061 / U:1.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site