public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Vasily Tarasov <vtaras@openvz.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	OpenVZ Developers List <devel@openvz.org>
Subject: Re: [PATCH] block layer: ioprio_best function fix
Date: Thu, 12 Oct 2006 15:09:07 +0200	[thread overview]
Message-ID: <20061012130907.GZ6515@kernel.dk> (raw)
In-Reply-To: <200610121213.k9CCDbPi004548@vass.7ka.mipt.ru>

On Thu, Oct 12 2006, Vasily Tarasov wrote:
> Currently ioprio_best function first checks wethere aioprio or bioprio equals
> IOPRIO_CLASS_NONE (ioprio_valid() macros does that) and if it is so it returns
> bioprio/aioprio appropriately. Thus the next four lines, that set aclass/bclass
> to IOPRIO_CLASS_BE, if aclass/bclass == IOPRIO_CLASS_NONE, are never executed.
> 
> The second problem: if aioprio from class IOPRIO_CLASS_NONE and bioprio from
> class IOPRIO_CLASS_IDLE are passed to ioprio_best function, it will return
> IOPRIO_CLASS_IDLE. It means that during __make_request we can merge two
> requests and set the priority of merged request to IDLE, while one of
> the initial requests originates from a process with NONE (default) priority.
> So we can get a situation when a process with default ioprio will experience
> IO starvation, while there is no process from real-time class in the system.
> 
> Just removing ioprio_valid check should correct situation.

Analysis looks correct, thanks.

-- 
Jens Axboe


      reply	other threads:[~2006-10-12 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 12:13 [PATCH] block layer: ioprio_best function fix Vasily Tarasov
2006-10-12 13:09 ` 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=20061012130907.GZ6515@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vtaras@openvz.org \
    /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