All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Mark Hemment <markhe@veritas.com>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Linus elevator
Date: Mon, 18 Dec 2000 19:40:50 +0100	[thread overview]
Message-ID: <20001218194050.A1186@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.21.0012181750350.22851-100000@alloc>
In-Reply-To: <Pine.LNX.4.21.0012181750350.22851-100000@alloc>; from markhe@veritas.com on Mon, Dec 18, 2000 at 06:13:53PM +0000

On Mon, Dec 18 2000, Mark Hemment wrote:
> Hi,
> 
>   Looking at the second loop in elevator_linus_merge(), it is possible for
> requests to have their elevator_sequence go negative.  This can cause a
> v long latency before the request is finally serviced.
> 
>   Say, for example, a request (in the queue) is jumped in the first loop
> in elevator_linus_merge() as "cmd != rw", even though its 
> elevator_sequence is zero.  If it is found that the new request will
> merge, the walking back over requests which were jumped makes no test for
> an already zeroed elevator_sequence.  Hence it zero values can occur.
> 
>   With high default values for read/wite_latency, this hardly ever occurs.
> 
>   A simple fix for this is to test for zero before decrementing (patch
> below) in the second loop.

The merge part was original deliberate, as not to account successful
merges as much as a new request added (and thus an implied seek). But
you did uncover a problem, btw this is also fixed in the blk-12 patch
that also does better accounting to avoid indefinite starvation.

>   Alternatively, should testing in the first loop be modified?

To stay with the original design, yes.

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

      reply	other threads:[~2000-12-18 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-18 18:13 [PATCH] Linus elevator Mark Hemment
2000-12-18 18:40 ` 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=20001218194050.A1186@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhe@veritas.com \
    --cc=torvalds@transmeta.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 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.