Re: simplify disksort, please review.
From: Pawel Jakub Dawidek (pjd_at_FreeBSD.org)
Date: 06/09/05
- Previous message: Bruce Evans: "Re: Retiring static libpam support"
- In reply to: Jeff Roberson: "simplify disksort, please review."
- Next in thread: Poul-Henning Kamp: "Re: simplify disksort, please review."
- Reply: Poul-Henning Kamp: "Re: simplify disksort, please review."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 9 Jun 2005 21:30:08 +0200 To: Jeff Roberson <jroberson@chesapeake.net>
On Wed, Jun 08, 2005 at 04:43:03PM -0400, Jeff Roberson wrote:
+> http://www.chesapeake.net/~jroberson/disksort.diff
+>
+> Our disksort algorithm used to be complicated by the BIO_ORDERED flag,
+> which could cause us to make some exceptions in the sorting. When the
+> ordered support was removed we never simplified the algorithm. The patch
+> above gets rid of the switch point and associated logic. It's now a
+> simple hinted insertion sort with a one way scan. Since it's a fairly
+> central algorithm, I'd appreciate a review.
It is not related to you patch, but I think our disk sort is just too
trivial.
The one example of how the order can be broken (write(offset, size)):
write(1024, 512)
write(0, 2048)
It'll be sorted to:
write(0, 2048)
write(1024, 512)
because we're sorting only based on offset.
AFAIR we now require from file system not to send next request to the same
area until previous request is not finished, so we should be safe (for now).
-- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
- application/pgp-signature attachment: stored
- Previous message: Bruce Evans: "Re: Retiring static libpam support"
- In reply to: Jeff Roberson: "simplify disksort, please review."
- Next in thread: Poul-Henning Kamp: "Re: simplify disksort, please review."
- Reply: Poul-Henning Kamp: "Re: simplify disksort, please review."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: attempt at qsort implementation
... qsortis not required to implement any particular sort algorithm. ... It's just
supposed to sort. ... out of order by sorting them and returning the first one.
... A recursive bogosort uses bogosort to sort the possible orders by ... (comp.lang.c) - Re: The ultimate luxury ?
... This is not sorting. ... My definition in terms of imposing a linear order
on a set is abstract ... and corresponds not to the algorithm of sorting, ... (sci.physics) - Re: Sorting lists in .Net - why it sucks
... Wintellect has written a set of generic collection classes that support what you are
looking for. ... Normal lists are expected to store duplicate values, ... Normal
sorting algorithms are just ... I don't know what sort algorithm did Microsoft use,
... (microsoft.public.dotnet.general) - Re: Sorting lists in .Net - why it sucks
... Wintellect has produced the "Power Collections Library" to bring some of the C++ Standard
Template Library's collection classes to the CLR programmer. ... Normal lists are
expected to store duplicate values, ... Normal sorting algorithms are just ... I
don't know what sort algorithm did Microsoft use, ... (microsoft.public.dotnet.general) - Re: APL and (very) large arrays
... Sort is at best O) depending on the sorting algorithm used, ... As to the OP's
question about primes, there are advanced efforts to compute pifor very large values of n, but
the only elementary method is to find all primes <= n and count them. ... By representing only
the odd values the sieve would require 62.5MB. ... (comp.lang.apl)