Re: [PATCH V2] vhost: introduce O(1) vq metadata cache

2017-02-27 Thread Jason Wang
On 2017年02月28日 02:35, Michael S. Tsirkin wrote: On Wed, Feb 15, 2017 at 01:37:17PM +0800, Jason Wang wrote: On 2016年12月14日 17:53, Jason Wang wrote: When device IOTLB is enabled, all address translations were stored in interval tree. O(lgN) searching time could be slow for virtqueue metadata

Re: [PATCH V2] vhost: introduce O(1) vq metadata cache

2017-02-27 Thread Michael S. Tsirkin
On Wed, Feb 15, 2017 at 01:37:17PM +0800, Jason Wang wrote: > > > On 2016年12月14日 17:53, Jason Wang wrote: > > When device IOTLB is enabled, all address translations were stored in > > interval tree. O(lgN) searching time could be slow for virtqueue > > metadata (avail, used and descriptors) since

Re: [PATCH V2] vhost: introduce O(1) vq metadata cache

2017-02-14 Thread Jason Wang
On 2016年12月14日 17:53, Jason Wang wrote: When device IOTLB is enabled, all address translations were stored in interval tree. O(lgN) searching time could be slow for virtqueue metadata (avail, used and descriptors) since they were accessed much often than other addresses. So this patch introduce

[PATCH V2] vhost: introduce O(1) vq metadata cache

2016-12-14 Thread Jason Wang
When device IOTLB is enabled, all address translations were stored in interval tree. O(lgN) searching time could be slow for virtqueue metadata (avail, used and descriptors) since they were accessed much often than other addresses. So this patch introduces an O(1) array which points to the interval