summaryrefslogtreecommitdiff
path: root/crypto/shash.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2017-02-28 12:56:02 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-03-02 02:35:06 +0300
commitf889491380582b4ba2981cf0b0d7d6a40fb30ab7 (patch)
tree2c09c351ea07a45719a217a37fcc2fcec8591dff /crypto/shash.c
parent0d9f0a52c8b9f7a003fe1650b7d5fb8518efabe0 (diff)
downloadlinux-f889491380582b4ba2981cf0b0d7d6a40fb30ab7.tar.xz
vhost: introduce O(1) vq metadata cache
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 tree nodes that store the translations of vq metadata. Those array were update during vq IOTLB prefetching and were reset during each invalidation and tlb update. Each time we want to access vq metadata, this small array were queried before interval tree. This would be sufficient for static mappings but not dynamic mappings, we could do optimizations on top. Test were done with l2fwd in guest (2M hugepage): noiommu | before | after tx 1.32Mpps | 1.06Mpps(82%) | 1.30Mpps(98%) rx 2.33Mpps | 1.46Mpps(63%) | 2.29Mpps(98%) We can almost reach the same performance as noiommu mode. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'crypto/shash.c')
0 files changed, 0 insertions, 0 deletions