Linux-kernel mailing list archive 2000-06,: Re: 2.3.42 elevator latency

# Re: 2.3.42 elevator latency

Stephen C. Tweedie (sct@redhat.com)
Tue, 8 Feb 2000 14:06:40 +0000 (GMT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Mohammad, Fayazur: "Help me to understand the ISDN device driver on Linux"
- Previous message: Peter Moulder: "Re: 2.4 Features"

Hi,

On Sat, 5 Feb 2000 23:37:44 +0100 (CET), Andrea Arcangeli
<andrea@suse.de> said:

> A 2.3.42 version of my elevator latency stuff is here:
> ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.42/elevator-starvation-3.gz

Last time I looked at this problem, the hard part was to find a way of
doing this which avoided scanning the whole queue looking for due
requests. It looks like the only way you can do that easily is with a
complex data structure such as avl-trees for the request list.

However, there was a mechanism which would allow you to deal with
starvation by scanning the request queue, but without having to modify
the whole queue when new requests are inserted.

The elevator_starve_rest_of_queue() function can be avoided if you use
sequence numbers instead, and give each request an IO sequence number at
which point that request becomes "due". You still need to scan the
whole queue to detect requests whose due dates have expired in order to
avoid starvation, but you don't ever need to write to requests once they
have been created, and that should make for much less CPU time consumed
(especially on SMP).

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Mohammad, Fayazur: "Help me to understand the ISDN device driver on Linux"
- Previous message: Peter Moulder: "Re: 2.4 Features"