Received: from eggs.gnu.org ([2001:4830:134:3::10]:37336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIF01-0002V9-Ho for qemu-devel@nongnu.org; Wed, 29 Jun 2016 08:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIEzz-0002R3-4w for qemu-devel@nongnu.org; Wed, 29 Jun 2016 08:53:48 -0400 References: <1467190029-694-1-git-send-email-vijayak@cavium.com> <1467190029-694-2-git-send-email-vijayak@cavium.com> From: Paolo Bonzini Message-ID: <9b75ea7f-4b2f-4377-483e-aab3ae36a01b@redhat.com> Date: Wed, 29 Jun 2016 14:53:36 +0200 MIME-Version: 1.0 In-Reply-To: <1467190029-694-2-git-send-email-vijayak@cavium.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/1] target-arm: Use Neon for zero checking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vijayak@cavium.com, qemu-arm@nongnu.org, peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, Prasun.Kapoor@cavium.com, vijay.kilari@gmail.com, Suresh On 29/06/2016 10:47, vijayak@cavium.com wrote: > From: Vijay > > Use Neon instructions to perform zero checking of > buffer. This is helps in reducing total migration time. > > Use case: Idle VM live migration with 4 VCPUS and 8GB ram > running CentOS 7. > > Without Neon, the Total migration time is 3.5 Sec > > Migration status: completed > total time: 3560 milliseconds > downtime: 33 milliseconds > setup: 5 milliseconds > transferred ram: 297907 kbytes > throughput: 685.76 mbps > remaining ram: 0 kbytes > total ram: 8519872 kbytes > duplicate: 2062760 pages > skipped: 0 pages > normal: 69808 pages > normal bytes: 279232 kbytes > dirty sync count: 3 > > With Neon, the total migration time is 2.9 Sec > > Migration status: completed > total time: 2960 milliseconds > downtime: 65 milliseconds > setup: 4 milliseconds > transferred ram: 299869 kbytes > throughput: 830.19 mbps > remaining ram: 0 kbytes > total ram: 8519872 kbytes > duplicate: 2064313 pages > skipped: 0 pages > normal: 70294 pages > normal bytes: 281176 kbytes > dirty sync count: 3 > > Signed-off-by: Vijaya Kumar K > Signed-off-by: Suresh > --- > util/cutils.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/util/cutils.c b/util/cutils.c > index 5830a68..4779403 100644 > --- a/util/cutils.c > +++ b/util/cutils.c > @@ -184,6 +184,13 @@ int qemu_fdatasync(int fd) > #define SPLAT(p) _mm_set1_epi8(*(p)) > #define ALL_EQ(v1, v2) (_mm_movemask_epi8(_mm_cmpeq_epi8(v1, v2)) == 0xFFFF) > #define VEC_OR(v1, v2) (_mm_or_si128(v1, v2)) > +#elif __aarch64__ > +#include "arm_neon.h" > +#define VECTYPE uint64x2_t > +#define ALL_EQ(v1, v2) \ > + ((vgetq_lane_u64(v1, 0) == vgetq_lane_u64(v2, 0)) && \ > + (vgetq_lane_u64(v1, 1) == vgetq_lane_u64(v2, 1))) > +#define VEC_OR(v1, v2) ((v1) | (v2)) > #else > #define VECTYPE unsigned long > #define SPLAT(p) (*(p) * (~0UL / 255)) > Acked-by: Paolo Bonzini