Re: [RFC] Generalize prio_tree (1/3)

From: Werner Almesberger
Date: Mon Nov 15 2004 - 16:45:13 EST

Rajesh Venkatasubramanian wrote:
> I thought about this, but this will lead to a very intrusive patch.

Possibly yes, unfortunately :-( All places where a node's keys change
would have to be updated, yes. Are there cases where vm_pgoff,
vm_start, or vm_end can change without doing a prio_tree_insert or
vma_prio_tree_insert afterwards ? If not, the key update could just
be moved into vma_prio_tree_insert and vma_prio_tree_add.

> We have to change the meaning of vm_start and vm_end or increase
> the size of vm_area_struct.

Nope :-) We already have space for adding one more long, i.e. h_index.
So all we need to do it to calculate and set it before going to

For r_index, one can use what I've described in the last mail.

> I am only worried about the micro-performance loss due to
> get_index in the hot-paths such as vma_prio_tree_insert.

Yes, it starts to look fairly heavy for what it does ...

- Werner

/ Werner Almesberger, Buenos Aires, Argentina werner@xxxxxxxxxxxxxxx /
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at