From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH v2] qemu-kvm: Speed up of the dirty-bitmap-traveling Date: Wed, 10 Feb 2010 09:54:05 -0600 Message-ID: <4B72D69D.7050005@codemonkey.ws> References: <4B728FF9.6010707@lab.ntt.co.jp> <4B72B28E.6010801@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: OHMURA Kei , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , mtosatti@redhat.com, Anthony Liguori To: Avi Kivity Return-path: Received: from mail-iw0-f185.google.com ([209.85.223.185]:44490 "EHLO mail-iw0-f185.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167Ab0BJPyK (ORCPT ); Wed, 10 Feb 2010 10:54:10 -0500 Received: by iwn15 with SMTP id 15so143138iwn.19 for ; Wed, 10 Feb 2010 07:54:09 -0800 (PST) In-Reply-To: <4B72B28E.6010801@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/10/2010 07:20 AM, Avi Kivity wrote: > On 02/10/2010 12:52 PM, OHMURA Kei wrote: > >> dirty-bitmap-traveling is carried out by byte size in qemu-kvm.c. >> But We think that dirty-bitmap-traveling by long size is faster than by byte >> size especially when most of memory is not dirty. >> >> --- a/bswap.h >> +++ b/bswap.h >> @@ -209,7 +209,6 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v) >> #define cpu_to_32wu cpu_to_le32wu >> #endif >> >> -#undef le_bswap >> #undef be_bswap >> #undef le_bswaps >> >> > > Anthony, is it okay to export le_bswap this way, or will you want > leul_to_cpu()? > kvm_get_dirty_pages_log_range() is kvm-specific code. We're guaranteed that when we're using kvm, target byte order == host byte order. So is it really necessary to use a byte swapping function at all? Regards, Anthony Liguori