* [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes
@ 2010-03-24 20:52 Divyesh Shah
2010-03-25 1:08 ` Vivek Goyal
2010-03-25 14:45 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Divyesh Shah @ 2010-03-24 20:52 UTC (permalink / raw)
To: jens.axboe; +Cc: linux-kernel, nauman, vgoyal
even if they are found to be co-operating.
The prio_trees do not have any IDLE cfqqs on them. cfq_close_cooperator()
is called from cfq_select_queue() and cfq_completed_request(). The latter
ensures that the close cooperator code does not get invoked if the current
cfqq is of class IDLE but the former doesn't seem to have any such checks.
So an IDLE cfqq may get merged with a BE cfqq from the same group which
should be avoided.
Signed-off-by: Divyesh Shah<dpshah@google.com>
---
block/cfq-iosched.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index dee9d93..e6910dc 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1721,6 +1721,8 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
{
struct cfq_queue *cfqq;
+ if (cfq_class_idle(cur_cfqq))
+ return NULL;
if (!cfq_cfqq_sync(cur_cfqq))
return NULL;
if (CFQQ_SEEKY(cur_cfqq))
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes
2010-03-24 20:52 [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes Divyesh Shah
@ 2010-03-25 1:08 ` Vivek Goyal
2010-03-25 14:45 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Vivek Goyal @ 2010-03-25 1:08 UTC (permalink / raw)
To: Divyesh Shah; +Cc: jens.axboe, linux-kernel, nauman
On Wed, Mar 24, 2010 at 01:52:03PM -0700, Divyesh Shah wrote:
> even if they are found to be co-operating.
>
> The prio_trees do not have any IDLE cfqqs on them. cfq_close_cooperator()
> is called from cfq_select_queue() and cfq_completed_request(). The latter
> ensures that the close cooperator code does not get invoked if the current
> cfqq is of class IDLE but the former doesn't seem to have any such checks.
> So an IDLE cfqq may get merged with a BE cfqq from the same group which
> should be avoided.
>
> Signed-off-by: Divyesh Shah<dpshah@google.com>
> ---
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Vivek
>
> block/cfq-iosched.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index dee9d93..e6910dc 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -1721,6 +1721,8 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
> {
> struct cfq_queue *cfqq;
>
> + if (cfq_class_idle(cur_cfqq))
> + return NULL;
> if (!cfq_cfqq_sync(cur_cfqq))
> return NULL;
> if (CFQQ_SEEKY(cur_cfqq))
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes
2010-03-24 20:52 [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes Divyesh Shah
2010-03-25 1:08 ` Vivek Goyal
@ 2010-03-25 14:45 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2010-03-25 14:45 UTC (permalink / raw)
To: Divyesh Shah; +Cc: linux-kernel, nauman, vgoyal
On Wed, Mar 24 2010, Divyesh Shah wrote:
> even if they are found to be co-operating.
>
> The prio_trees do not have any IDLE cfqqs on them. cfq_close_cooperator()
> is called from cfq_select_queue() and cfq_completed_request(). The latter
> ensures that the close cooperator code does not get invoked if the current
> cfqq is of class IDLE but the former doesn't seem to have any such checks.
> So an IDLE cfqq may get merged with a BE cfqq from the same group which
> should be avoided.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-25 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 20:52 [PATCH] cfq-iosched: Do not merge queues of BE and IDLE classes Divyesh Shah
2010-03-25 1:08 ` Vivek Goyal
2010-03-25 14:45 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox