All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Divyesh Shah <dpshah@google.com>
Cc: czoccolo@gmail.com, linux-kernel@vger.kernel.org,
	nauman@google.com, mikew@google.com, ctalbott@google.com
Subject: Re: [PATCH] cfq-iosched: Respect ioprio_class when preempting
Date: Mon, 11 Jan 2010 16:15:39 +0100	[thread overview]
Message-ID: <20100111151539.GP4489@kernel.dk> (raw)
In-Reply-To: <20100107025413.27610.48801.stgit@austin.mtv.corp.google.com>

On Wed, Jan 06 2010, Divyesh Shah wrote:
> In cfq_should_preempt(), we currently allow some cases where a non-RT request
> can preempt an ongoing RT cfqq timeslice. This should not happen.
> Examples include:
> 
> o A sync_noidle wl type non-RT request pre-empting a sync_noidle wl type cfqq
>   on which we are idling.
> o Once we have per-cgroup async queues, a non-RT sync request pre-empting a RT
>   async cfqq.
> 
> Signed-off-by: Divyesh Shah<dpshah@google.com>
> ---
> 
>  block/cfq-iosched.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index 7d6cef9..e9e6610 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -3104,6 +3104,12 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
>  		return true;
>  
>  	/*
> +	 * Don't allow a non-RT request to preempt an ongoing RT cfqq timeslice.
> +	 */
> +	if (cfq_class_rt(cfqq) && !cfq_class_rt(new_cfqq))
> +		return false;

It would be nice to just be able to do

        if (new_cfqq->ioprio_class > cfqq->ioprio_class)
                return false;

but that doesn't quite work given IOPRIO_CLASS_NONE < _RT. So I think
your patch is fine, I've added it. Thanks.

-- 
Jens Axboe


      reply	other threads:[~2010-01-11 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07  2:58 [PATCH] cfq-iosched: Respect ioprio_class when preempting Divyesh Shah
2010-01-11 15:15 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100111151539.GP4489@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=ctalbott@google.com \
    --cc=czoccolo@gmail.com \
    --cc=dpshah@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=nauman@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.