All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Werner Almesberger <wa@almesberger.net>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: elevator priorities vs. full request queues
Date: Tue, 22 Jun 2004 12:14:35 +0200	[thread overview]
Message-ID: <20040622101434.GB12881@suse.de> (raw)
In-Reply-To: <20040622052644.D1325@almesberger.net>

On Tue, Jun 22 2004, Werner Almesberger wrote:
> Jens Axboe wrote:
> > Well yes, different parties have worked on io priorities in the past.
> > Request allocation is a important part of that.
> 
> I only found your "cfq + io priorities" posting from November
> 2003. Are there any others that are publicly available ?

Don't think I posted any newer ones, I'll see if I can get something
posted today/tomorrow (or at least before going on vacation thursday).

> > #4 doesn't work for various reasons, the obvious being that the request
> > is already allocated at this point.
> 
> The idea would be to refuse/delay low-priority requests before
> reaching the queue limit. But yes, having a possibly large
> number of allocated but not enqueuable requests sit around,
> or being forced to discard requests after building them, may
> not be so great.

That's pushing the problem somewhere it doesn't belong, imho. Let the
process block in getting a request instead, it doesn't make sense to let
it allocate a request and then refuse to queue it. Plus it raises all
sorts of handling in the lower layers to cope with this.

> > CFQ with priorities used a combination of 2+3. It seems you haven't
> > looked any of this up, maybe that would be a good starting point.
> 
> I had to have a second look :-) I didn't quite realize that
> your changes actually solved that. Nice and simple. Are there
> any newer versions of it ? What are your plans for IO priorities
> anyway ?

It's basically just deciding whether a process can allocate a request in
elv_may_queue(). Christoffer Hall implemented split allocation lists as
well.

My general plans for IO priorities basically involve rewriting lots of
ll_rw_blk, I'm afraid. Not fundamentally, but there are some areas that
don't work well if you assign different rights to different processes.
One being the queue congested bit - the queue may be congested for
processs A, but not for B. And I'd like to pass in priority through the
bio, like described further down.

> > CFQ used per-process (-group) priorities,
> 
> In my case, they're per open file or per memory page. The latter
> works as follows: pages are explicitly prefetched at the
> application's declared read rate. When doing this, the prefetcher
> sets the page's priority, which the elevator retrieves. Sound
> complicated but actually doesn't cause all that much overhead. As
> a welcome side-effect, prefetching also limits the high-priority
> IO activity an application can generate.

It doesn't sound too complicated :)

> > A bio has room for priority info, so you could also pass it in
> > from submit_bio() -> __make_request() -> get_request() -> may_queue().
> 
> Hmm yes, that's the large set of little changes I was hoping to
> avoid. But I guess there's no way around this.

I'd much rather do it this way, since I think it's the right way. It
might make sense to just do this change right away and merge it, just
using a static io priority. Makes it easier to build and work on an
external scheduler using priorities without throwing lots of rejects in
the core. It's not really a lot of work, either...

-- 
Jens Axboe


  reply	other threads:[~2004-06-22 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22  4:25 elevator priorities vs. full request queues Werner Almesberger
2004-06-22  7:48 ` Jens Axboe
2004-06-22  8:26   ` Werner Almesberger
2004-06-22 10:14     ` Jens Axboe [this message]
2004-06-22 19:08       ` Werner Almesberger
2004-06-23 10:14         ` Jens Axboe
2004-06-23 12:46           ` Werner Almesberger
2004-06-23 16:46             ` Jens Axboe
2004-06-23 16:57               ` Werner Almesberger
2004-06-23 17:00                 ` Jens Axboe
2004-06-23 23:02                   ` Werner Almesberger
2004-07-12 23:52           ` Werner Almesberger
2004-07-13  5:37             ` Jens Axboe
2004-07-13 12:29               ` Werner Almesberger
2004-07-13 12:35                 ` Jens Axboe
2004-07-13 16:36                   ` Werner Almesberger
2004-07-13 16:59                     ` Jens Axboe

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=20040622101434.GB12881@suse.de \
    --to=axboe@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=wa@almesberger.net \
    /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.