All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthias.bgg@gmail.com (Matthias Brugger)
To: kernelnewbies@lists.kernelnewbies.org
Subject: BFQ: simple elevator
Date: Sat, 23 Mar 2013 15:38:49 +0100	[thread overview]
Message-ID: <514DBE79.10203@gmail.com> (raw)
In-Reply-To: <CAGDaZ_qt7GyORbaZzrTg4drxRgBncU-_T2ONYHzD=GLw=pn6Vw@mail.gmail.com>

On 03/20/2013 10:41 PM, Raymond Jennings wrote:
> On Wed, Mar 20, 2013 at 2:03 PM,  <Valdis.Kletnieks@vt.edu> wrote:
>> On Thu, 21 Mar 2013 02:24:23 +0700, Mulyadi Santosa said:
>>
>>> pardon me for any possible sillyness, but what happen if there are
>>> incoming I/O operation at very nearby sectors (or perhaps at the same
>>> sector?)? I suppose, the elevator will prioritize them first over the
>>> rest? (i.e starving will happen...)
> This is actually why I proposed to enforce forward progress by only
> looking for further requests in one direction at a time.
>
> Suppose you have requests at sectors 1, 4, 5, and 6
>
> You dispatch sectors 1, 4, and 5, leaving the head parked at 5 and the
> direction as ascending.
>
> But suddenly, just before you get a chance to dispatch for sector 6,
> sector 4 gets busy again.
>
> I'm not proposing going back to sector 4.  It's behind us and (as you
> indicated) we could starve sector 6 indefinitely.
>
> So instead, because sector 4 is on the wrong side of our present head
> position, it is ignored and we keep marching forward, and then we hit
> sector 6 and dispatch it.
>
> Once we hit sector 6 and dispatch it, we do a u-turn and start
> descending.  That's when we pick up sector 4 again.
>
> When we're going up, we ignore what's below us, and when we're going
> down we ignore what is above us.
>
> We only switch directions when there's nothing in front of us the way
> we were going.  In theory, given that disk capacity is itself finite,
> so too is the amount of time one has to wait before getting reached by
> the elevator.
>
> Anyway, does this clarification answer your concerns about starvation?
>
>> And this, my friends, is why elevators aren't as easy to do as the average
>> undergrad might hope - it's a lot harder to balance fairness and throughput
>> across all the corner cases than you might think.  It gets really fun
>> when you have (for example) a 'find' command moving the heads all over
>> the disk while another process is trying to do large amounts of streaming
>> I/O.  And then you'll get some idiot process that insists on doing the
>> occasional fsync() or syncfs() call.  Yes, it's almost always *all*
>> corner cases, it's very rare (unless you're an embedded system like a Tivo)
>> that all your I/O is one flavor that is easily handled by a simple elevator.
> In my case I'm just concerned with raw total system throughput.
>
> I called it "BFQ" for a reason.

It sounds to me like the LOOK disk scheduling algorithm from 1970? Or do 
I miss something?

  parent reply	other threads:[~2013-03-23 14:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 15:54 BFQ: simple elevator Raymond Jennings
2013-03-20 19:24 ` Mulyadi Santosa
2013-03-20 21:03   ` Valdis.Kletnieks at vt.edu
2013-03-20 21:41     ` Raymond Jennings
2013-03-20 23:10       ` Valdis.Kletnieks at vt.edu
2013-03-20 23:37         ` Raymond Jennings
2013-03-21  9:13           ` Valdis.Kletnieks at vt.edu
2013-03-21  9:37             ` Raymond Jennings
2013-03-22  3:52               ` Mulyadi Santosa
2013-03-22 20:50                 ` Raymond Jennings
2013-03-22 20:53                   ` Raymond Jennings
2013-03-22 21:20                     ` Valdis.Kletnieks at vt.edu
2013-03-23  0:05                       ` Raymond Jennings
2013-03-23 16:42                         ` Matthias Brugger
2013-03-25 19:15                           ` Raymond Jennings
2013-03-25 22:27                             ` Matthias Brugger
2013-03-25 22:29                               ` Raymond Jennings
2013-03-23  1:42                       ` Raymond Jennings
2013-03-23 14:38       ` Matthias Brugger [this message]
2013-03-25 18:19         ` Raymond Jennings
2013-03-20 23:05     ` Linux elevators (Re: BFQ: simple elevator) Arlie Stephens
2013-03-20 23:16       ` Valdis.Kletnieks at vt.edu
2013-03-20 23:45         ` Arlie Stephens
2013-03-21  1:00           ` Raymond Jennings

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=514DBE79.10203@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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.