vhost: restrict pointer aliasing for packed ring
authorJoyce Kong <joyce.kong@arm.com>
Fri, 10 Jul 2020 02:38:50 +0000 (10:38 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 10 Jul 2020 13:43:41 +0000 (15:43 +0200)
Restrict pointer aliasing to allow the compiler to vectorize loop
more aggressively.

With this patch, a 9.6% improvement is observed in throughput for
the packed virtio-net PVP case, and a 2.8% improvement in throughput
for the packed virtio-user PVP case. All performance data are measured
on ThunderX-2 platform under 0.001% acceptable packet loss with 1 core
on both vhost and virtio side.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>

No differences found