From: Igor Mammedov Date: Tue, 16 Jun 2015 16:33:35 +0000 (+0200) Subject: vhost: use binary search instead of linear in find_region() X-Git-Tag: omap-for-v4.3/fixes-merge-window~204^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcfeacab45e6d419c6bafc0e57ea4b1125e23231;p=pandora-kernel.git 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: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- Reading git-diff-tree failed