Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bcfeacab authored by Igor Mammedov's avatar Igor Mammedov Committed by Michael S. Tsirkin
Browse files

vhost: use binary search instead of linear in find_region()



For default region layouts performance stays the same
as linear search i.e. it takes around 210ns average for
translate_desc() that inlines find_region().

But it scales better with larger amount of regions,
235ns BS vs 300ns LS with 55 memory regions
and it will be about the same values when allowed number
of slots is increased to 509 like it has been done in kvm.

Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 8b0a9d42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment