Re: elevator algorithm bug in ll_rw_blk.c

Chris Wedgwood (cw@ix.net.nz)
Mon, 16 Nov 1998 09:04:43 +1300


On Fri, Nov 13, 1998 at 08:31:56PM +0100, Matthias Andree wrote:

> As everybody knows, Quick Sort is not immune to worst case condition,
> flooding your stack and rising its complexity to O(nē), which makes it
> inadequate for time-/memory-critical environments such as kernels. You
> might want to use some simpler algorithm which is stable, such as
> ShellSort or CombSort, and yet, if there are a LOT of entries to be
> sorted like around >>1,000 blocks, you might consider Heap Sort - I
> assume, Heap Sort would be overkill.

Oh, I knew this - it was just a hack and quicksort was what I choose
for testing. I have some shell sort code from Colin Plumb that seems
pretty cheap stack-wise.

-cw

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