> Yes, the free_area_cache is always going to have failure modes - I
The standard dumb way to do that would be to have two parallel trees, one to
index free space (similar to e.g. the free space btrees in XFS) and the
other to index the objects (like today). That would increase the constant
factor somewhat by bloating the VMAs, increasing cache overhead etc, and
also would be more brute force than elegant. But it would be simple
and straight forward.
Perhaps the combined data structure experience of linux-kernel can come
up with something better and some data structure that allows to look
up both efficiently?
This would be also an opportunity to reevaluate rbtrees for the object
index. One drawback of them is that they are not really optimized to be
cache friendly because their nodes are too small.
-Andi
--