Forget to cc the mailing list.
On 4/22/2016 9:53 PM, Xie, Huawei wrote:
> Hi:
>
> This is a series of virtio/vhost idx/ring update optimizations for cache
> to cache transfer. Actually I don't expect many of them as virtio/vhost
> has already done quite right.
>
> For this patch, in a VM2VM test, i observed ~6% performance increase.
> In VM1, run testpmd with txonly mode
> In VM2, run testpmd with rxonly mode
> In host, run testpmd(with two vhostpmds) with io forward
>
> Michael:
> We have talked about this method when i tried the fixed ring.
>
>
> On 4/22/2016 5:12 PM, Xie, Huawei wrote:
>> eliminate unnecessary cache to cache transfer between virtio and vhost
>> core
>>
>> ---
>> drivers/net/virtio/virtqueue.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
>> index 4e9239e..8c46a83 100644
>> --- a/drivers/net/virtio/virtqueue.h
>> +++ b/drivers/net/virtio/virtqueue.h
>> @@ -302,7 +302,8 @@ vq_update_avail_ring(struct virtqueue *vq, uint16_t
>> desc_idx)
>> * descriptor.
>> */
>> avail_idx = (uint16_t)(vq->vq_avail_idx & (vq->vq_nentries - 1));
>> - vq->vq_ring.avail->ring[avail_idx] = desc_idx;
>> + if (unlikely(vq->vq_ring.avail->ring[avail_idx] != desc_idx))
>> + vq->vq_ring.avail->ring[avail_idx] = desc_idx;
>> vq->vq_avail_idx++;
>> }
>>
>