lkml.org 
[lkml]   [2000]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectelevator-starvation-5 (request queue rewrite)
The new elevator code is here:

ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.46pre1/elevator-starvation-5.gz

I tested it hard on both scsi and ide (IA32 and alpha) and it works fine
here. There are also SMP locking fixes for both nbd and sbpcd in it.

It rewrites the request queue and replaces the next field with a list_head
structure. This allows the best case to run in O(1) even if the queue is
almost full. The worse case still runs in O(n) but it does at most two
passes in the worst case (the worst case is where we have to drop the lock
because there's none request available and it wasn't possible to coalesce
the bh in a just queued request and none of the the requests is timed
out). The request list is not dirtified anymore. The common case will
certainly get advantages from the new implementation.

One change it worth describing is that in the drivers "!CURRENT == 1"
doesn't mean anymore that the request queue is empty. For checking if
there are requests queued you have to use a new macro called QUEUE_EMPTY.

Right now there's some consistency debugging code enabled that shouldn't
hurt performance though since I run it at once every 100 make_request
executed. It can be disabled via a define.

If something is unclear feel free to ask me. Comments are welcome.

Andrea


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.068 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site