Implement a simple interval tree.#1
Conversation
A special interval tree implementation for VMM resource management. It's not designed as a generic interval tree, but specialized for VMM resource management. Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
sboeuf
left a comment
There was a problem hiding this comment.
I'm curious why we need such a complex and rich Interval tree? I'm asking because it's not obvious which benefits this will bring. Could you elaborate on the need for this and include it part of the documentation (in the code) and also as part of the git commit.
|
It will be used to manage PCI bus resources, such as mmio/pio address ranges. We are refactoring PCI crate from cloud hypervisor. |
I think @sboeuf question is similar to the one I asked upstream.
|
|
Here is an example to use the interval tree to implement an epoll manager with support of device hotplug. Actually the device manager should use an interval tree instead of an btree to map address to registered DeviceIo objects. |
|
I'm merging this PR into the dragonball branch in order to allow @jiangliu to submit the vm-pci code from dragonball. |
A special interval tree implementation for VMM resource management.
It's not designed as a generic interval tree, but specialized for VMM
resource management.
Signed-off-by: wllenyj wllenyj@linux.alibaba.com