Re: [lockup] Re: objrmap-core-1 (rmap removal for file mappings toavoid 4:4 in <=16G machines)

From: Rik van Riel
Date: Wed Mar 10 2004 - 08:02:43 EST


On Wed, 10 Mar 2004, Andrea Arcangeli wrote:
> On Tue, Mar 09, 2004 at 06:56:50PM +0100, Andrea Arcangeli wrote:
> > We've lot of room for improvements.
>
> Rajesh has a smart idea on how to fix the complexity issue (for both
> truncate and vm) and it involes a new non trivial data structure.
>
> I trust he will make it, but if there will be any trouble with his
> approch for safety I'm currently planning on a simpler fallback solution
> that I can manage without having to design a new tree data structure.
>
> Sharing his "tree and sorting" idea, the fallback I propose is to simply
> index the vmas in a rbtree too.

That simply results in looking up less VMAs for low file
indexes, but still needing to check all of them for high
file indexes.

You really want to sort on both the start and end offset
of the VMA, as can be done with a kd-tree or kdb-tree.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/