* cfq-iosched: no need to keep track of busy_rt_queues
@ 2009-07-09 20:47 Vivek Goyal
2009-07-09 20:51 ` [PATCH] " Vivek Goyal
0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2009-07-09 20:47 UTC (permalink / raw)
To: Jens Axboe, linux kernel mailing list; +Cc: Divyesh Shah, Moyer Jeff Moyer
o Get rid of busy_rt_queues infrastructure. Looks like it is redundant.
o Once an RT queue gets request it will preempt any of the BE or IDLE queues
immediately. Otherwise this queue will be put on service tree and scheduler
will anyway select this queue before any of the BE or IDLE queue. Hence
looks like there is no need to keep track of how many busy RT queues are
currently on service tree.
o I ran one RT reader and two BE readers. Can't see preemption due to
busy_rt_queues kicking in.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
block/cfq-iosched.c | 24 ------------------------
1 file changed, 24 deletions(-)
Index: linux5/block/cfq-iosched.c
===================================================================
--- linux5.orig/block/cfq-iosched.c 2009-07-09 16:30:46.000000000 -0400
+++ linux5/block/cfq-iosched.c 2009-07-09 16:31:48.000000000 -0400
@@ -134,11 +134,6 @@ struct cfq_data {
struct rb_root prio_trees[CFQ_PRIO_LISTS];
unsigned int busy_queues;
- /*
- * Used to track any pending rt requests so we can pre-empt current
- * non-RT cfqq in service when this value is non-zero.
- */
- unsigned int busy_rt_queues;
int rq_in_driver;
int sync_flight;
@@ -648,9 +643,6 @@ static void cfq_add_cfqq_rr(struct cfq_d
BUG_ON(cfq_cfqq_on_rr(cfqq));
cfq_mark_cfqq_on_rr(cfqq);
cfqd->busy_queues++;
- if (cfq_class_rt(cfqq))
- cfqd->busy_rt_queues++;
-
cfq_resort_rr_list(cfqd, cfqq);
}
@@ -673,8 +665,6 @@ static void cfq_del_cfqq_rr(struct cfq_d
BUG_ON(!cfqd->busy_queues);
cfqd->busy_queues--;
- if (cfq_class_rt(cfqq))
- cfqd->busy_rt_queues--;
}
/*
@@ -1179,20 +1169,6 @@ static struct cfq_queue *cfq_select_queu
goto expire;
/*
- * If we have a RT cfqq waiting, then we pre-empt the current non-rt
- * cfqq.
- */
- if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) {
- /*
- * We simulate this as cfqq timed out so that it gets to bank
- * the remaining of its time slice.
- */
- cfq_log_cfqq(cfqd, cfqq, "preempt");
- cfq_slice_expired(cfqd, 1);
- goto new_queue;
- }
-
- /*
* The active queue has requests and isn't expired, allow it to
* dispatch.
*/
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] cfq-iosched: no need to keep track of busy_rt_queues
2009-07-09 20:47 cfq-iosched: no need to keep track of busy_rt_queues Vivek Goyal
@ 2009-07-09 20:51 ` Vivek Goyal
2009-07-10 8:18 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2009-07-09 20:51 UTC (permalink / raw)
To: Jens Axboe, linux kernel mailing list; +Cc: Divyesh Shah, Moyer Jeff Moyer
Resending as had forgotten to put "[PATCH]" in subject line.
o Get rid of busy_rt_queues infrastructure. Looks like it is redundant.
o Once an RT queue gets request it will preempt any of the BE or IDLE queues
immediately. Otherwise this queue will be put on service tree and scheduler
will anyway select this queue before any of the BE or IDLE queue. Hence
looks like there is no need to keep track of how many busy RT queues are
currently on service tree.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
block/cfq-iosched.c | 24 ------------------------
1 file changed, 24 deletions(-)
Index: linux5/block/cfq-iosched.c
===================================================================
--- linux5.orig/block/cfq-iosched.c 2009-07-09 16:30:46.000000000 -0400
+++ linux5/block/cfq-iosched.c 2009-07-09 16:31:48.000000000 -0400
@@ -134,11 +134,6 @@ struct cfq_data {
struct rb_root prio_trees[CFQ_PRIO_LISTS];
unsigned int busy_queues;
- /*
- * Used to track any pending rt requests so we can pre-empt current
- * non-RT cfqq in service when this value is non-zero.
- */
- unsigned int busy_rt_queues;
int rq_in_driver;
int sync_flight;
@@ -648,9 +643,6 @@ static void cfq_add_cfqq_rr(struct cfq_d
BUG_ON(cfq_cfqq_on_rr(cfqq));
cfq_mark_cfqq_on_rr(cfqq);
cfqd->busy_queues++;
- if (cfq_class_rt(cfqq))
- cfqd->busy_rt_queues++;
-
cfq_resort_rr_list(cfqd, cfqq);
}
@@ -673,8 +665,6 @@ static void cfq_del_cfqq_rr(struct cfq_d
BUG_ON(!cfqd->busy_queues);
cfqd->busy_queues--;
- if (cfq_class_rt(cfqq))
- cfqd->busy_rt_queues--;
}
/*
@@ -1179,20 +1169,6 @@ static struct cfq_queue *cfq_select_queu
goto expire;
/*
- * If we have a RT cfqq waiting, then we pre-empt the current non-rt
- * cfqq.
- */
- if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) {
- /*
- * We simulate this as cfqq timed out so that it gets to bank
- * the remaining of its time slice.
- */
- cfq_log_cfqq(cfqd, cfqq, "preempt");
- cfq_slice_expired(cfqd, 1);
- goto new_queue;
- }
-
- /*
* The active queue has requests and isn't expired, allow it to
* dispatch.
*/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cfq-iosched: no need to keep track of busy_rt_queues
2009-07-09 20:51 ` [PATCH] " Vivek Goyal
@ 2009-07-10 8:18 ` Jens Axboe
2009-07-13 21:29 ` Divyesh Shah
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2009-07-10 8:18 UTC (permalink / raw)
To: Vivek Goyal; +Cc: linux kernel mailing list, Divyesh Shah, Moyer Jeff Moyer
On Thu, Jul 09 2009, Vivek Goyal wrote:
> Resending as had forgotten to put "[PATCH]" in subject line.
>
> o Get rid of busy_rt_queues infrastructure. Looks like it is redundant.
>
> o Once an RT queue gets request it will preempt any of the BE or IDLE queues
> immediately. Otherwise this queue will be put on service tree and scheduler
> will anyway select this queue before any of the BE or IDLE queue. Hence
> looks like there is no need to keep track of how many busy RT queues are
> currently on service tree.
Looks good, I'll queue this up for 2.6.32.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cfq-iosched: no need to keep track of busy_rt_queues
2009-07-10 8:18 ` Jens Axboe
@ 2009-07-13 21:29 ` Divyesh Shah
0 siblings, 0 replies; 4+ messages in thread
From: Divyesh Shah @ 2009-07-13 21:29 UTC (permalink / raw)
To: Jens Axboe; +Cc: Vivek Goyal, linux kernel mailing list, Moyer Jeff Moyer
Change looks good to me too.
On Fri, Jul 10, 2009 at 1:18 AM, Jens Axboe<jens.axboe@oracle.com> wrote:
> On Thu, Jul 09 2009, Vivek Goyal wrote:
>> Resending as had forgotten to put "[PATCH]" in subject line.
>>
>> o Get rid of busy_rt_queues infrastructure. Looks like it is redundant.
>>
>> o Once an RT queue gets request it will preempt any of the BE or IDLE queues
>> immediately. Otherwise this queue will be put on service tree and scheduler
>> will anyway select this queue before any of the BE or IDLE queue. Hence
>> looks like there is no need to keep track of how many busy RT queues are
>> currently on service tree.
>
> Looks good, I'll queue this up for 2.6.32.
>
> --
> Jens Axboe
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-13 21:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 20:47 cfq-iosched: no need to keep track of busy_rt_queues Vivek Goyal
2009-07-09 20:51 ` [PATCH] " Vivek Goyal
2009-07-10 8:18 ` Jens Axboe
2009-07-13 21:29 ` Divyesh Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox