> I can also remove the N**2 aspect of inserting into the list by keeping
> the list sorted, and then using a binary search to check for the
> existence of the block on the list, and then do a sorted insert into the
> list.
Are you actually still talking about a small fixed-sized array here (which
sounds cumbersome) or a linked list (which is slightly more challenging
to binary search efficiently). The problem does immediately suggest a tree
approach though. In fact there might be several places in the VFS where we
build and sort lists (elevator algorithm?) that might be more efficiently
done with trees.
-- "Love the dolphins," she advised him. "Write by W.A.S.T.E.."
- 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/