diff options
| author | Vincenzo Maffione | 2016-01-31 11:29:04 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-02-06 19:44:08 +0100 |
| commit | b796fcd1bf2978aed15748db04e054f34789e9eb (patch) | |
| tree | 93261b84a89e31a55a29472ab256b32b066e0a5c /bootdevice.c | |
| parent | virtio: combine the read of a descriptor (diff) | |
| download | qemu-b796fcd1bf2978aed15748db04e054f34789e9eb.tar.gz qemu-b796fcd1bf2978aed15748db04e054f34789e9eb.tar.xz qemu-b796fcd1bf2978aed15748db04e054f34789e9eb.zip | |
virtio: cache used_idx in a VirtQueue field
Accessing used_idx in the VQ requires an expensive access to
guest physical memory. Before this patch, 3 accesses are normally
done for each pop/push/notify call. However, since the used_idx is
only written by us, we can track it in our internal data structure.
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Message-Id: <3d062ec54e9a7bf9fb325c1fd693564951f2b319.1450218353.git.v.maffione@gmail.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'bootdevice.c')
0 files changed, 0 insertions, 0 deletions
