linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: Justin TerAvest <teravest@google.com>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Chad Talbott <ctalbott@google.com>
Subject: Re: Why do we use cpu nice priority for ioprio?
Date: Fri, 25 Mar 2011 08:48:06 +0100	[thread overview]
Message-ID: <4D8C48B6.6050300@fusionio.com> (raw)
In-Reply-To: <BANLkTimiL5VZki4oUaw5hQYgB=E2jYwKrw@mail.gmail.com>

On 2011-03-25 03:38, Justin TerAvest wrote:
> It's not clear why the cpu nice value should be mapped to the ioprio
> for a task when none is picked.
> 
> Internally, at cfq_init_prio_data(), we just set:
> 		ioprio = IOPRIO_NORM;
> 		ioprio_class = IOPRIO_CLASS_BE;
> if ioprio_class is IOPRIO_CLASS_NONE.
> 
> 
> The problem is that  today, SCHED_RR and SCHED_FIFO threads
> automatically get bumped up to RT class. This all happens behind the
> curtains and the io_class of the thread is still shown as NONE with
> sys_ioprio_get(). What's the motivation behind this promotion of
> ioprio class?

It was decided back in the day when io priorities were introduced. I
still think it's a good idea. You could argue that auto-bumping up to
IOPRIO_CLASS_RT is a bit heavy handed. But is it really that different
from the CPU scheduling?

So, from memory, the difference between RR and FIFO on the CPU
scheduling side is that one of them will relingiush the CPU for a brief
period once in a while. Correct? That does not happen for
IOPRIO_CLASS_RT. So at least from that perspective, it's not a complete
match and might be a cause for concern.

-- 
Jens Axboe


  reply	other threads:[~2011-03-25  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25  2:38 Why do we use cpu nice priority for ioprio? Justin TerAvest
2011-03-25  7:48 ` Jens Axboe [this message]
2011-03-30 18:23   ` Justin TerAvest
2011-03-30 18:34     ` Vivek Goyal
2011-03-31  3:59       ` Justin TerAvest

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=4D8C48B6.6050300@fusionio.com \
    --to=jaxboe@fusionio.com \
    --cc=ctalbott@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teravest@google.com \
    --cc=vgoyal@redhat.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 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).