Just a few comments about data structures - not important.
Technically I think that a priority queue, i.e. a heap (partially
ordered tree) is sufficient for the request queue. I don't know the
request queue code well enough to be sure, though.
Both heaps and trees are O(N log N), the difference being that an
rbtree does a bit more constant-time work to balance the tree while
maintaining a stricter ordering.
If it was worth it (I suspect not), you can make a data structure
which has O(1) amortised insertion time for a number of common cases,
such as runs of ascending block numbers. Seems a likely pattern for a
filesystem...
Implementing the latter would likely be a lot of work for little gain
though.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/