From: Werner Almesberger <wa@almesberger.net>
To: linux-fsdevel@vger.kernel.org
Subject: elevator priorities vs. full request queues
Date: Tue, 22 Jun 2004 01:25:02 -0300 [thread overview]
Message-ID: <20040622012502.B1325@almesberger.net> (raw)
Another issue regarding priorities: let's suppose we have "high"
and "low" priority requests. Those priorities are indicated by
some means, and do not depend on CPU scheduler priorities. Let's
say that the elevator always handles high priority requests
first, unless barriers dictate it to do otherwise.
So far so good. Next, let's suppose that the request queue is
filling up. Now all the processes doing IO will compete for
request slots, and the outcome of this competition is
determined by the CPU scheduler - which is blissfully unaware
of those request priorities.
Has anybody thought of a solution for this problem ?
I can think of a few possible approaches, but they're all
relatively intrusive or plain ugly. A few of them:
1) temporarily raise the CPU priority of processes waiting
for request queue slots
2) implement some priority scheme in ll_rw_blk.c
3) give elv_may_queue more information about what the request
will look like, so that it can decide to accept "high"
priority requests even if the queue is officially full
4) allow elv_add_request to refuse requests, e.g. to keep
some reserve for "high" priority requests
1) and 2) would have the advantage that they also work if
requests are delayed due to a lack of memory. However, in this
case, all bets are off anyway, so I wouldn't worry too much
about it.
3) and 4) have the nice property of keeping all the priority
logic entirely in the elevator. For 4), one would also have to
force an interface change (besides giving elv_add_request a
return value), to make sure there are no enqueuers left in the
kernel or elsewhere which don't know that elv_add_request may
now fail.
Opinions ?
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
next reply other threads:[~2004-06-22 4:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 4:25 Werner Almesberger [this message]
2004-06-22 7:48 ` elevator priorities vs. full request queues Jens Axboe
2004-06-22 8:26 ` Werner Almesberger
2004-06-22 10:14 ` Jens Axboe
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=20040622012502.B1325@almesberger.net \
--to=wa@almesberger.net \
--cc=linux-fsdevel@vger.kernel.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 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.