qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>,
	mtosatti@redhat.com,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] Re: [PATCH v2] qemu-kvm: Speed up of the dirty-bitmap-traveling
Date: Wed, 10 Feb 2010 17:57:40 +0200	[thread overview]
Message-ID: <4B72D774.80807@redhat.com> (raw)
In-Reply-To: <4B72D69D.7050005@codemonkey.ws>

On 02/10/2010 05:54 PM, Anthony Liguori wrote:
> 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?
>   

The dirty log bitmap is always little endian. This is so we don't have
to depend on sizeof(long) (which can vary between kernel and userspace)
or mandate some other access size.

(if native endian worked, then the previous byte-based code would have
been broken on big endian).

Seriously, those who say that big vs little endian is a matter of taste
are missing something.


-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2010-02-10 15:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 10:52 [Qemu-devel] [PATCH v2] qemu-kvm: Speed up of the dirty-bitmap-traveling OHMURA Kei
2010-02-10 13:10 ` [Qemu-devel] " Ulrich Drepper
2010-02-10 13:20 ` Avi Kivity
2010-02-10 15:54   ` Anthony Liguori
2010-02-10 15:57     ` Avi Kivity [this message]
2010-02-10 16:00     ` Alexander Graf
2010-02-10 16:35       ` Anthony Liguori
2010-02-10 16:43         ` Alexander Graf
2010-02-10 16:46           ` Avi Kivity
2010-02-10 16:47             ` Alexander Graf
2010-02-10 16:52               ` Avi Kivity
2010-02-10 16:54                 ` Alexander Graf
2010-02-10 16:43         ` Avi Kivity
2010-02-10 15:55   ` Anthony Liguori
2010-02-12  2:03     ` OHMURA Kei
2010-02-14 12:34       ` Avi Kivity
2010-02-15  6:12         ` OHMURA Kei
2010-02-15  8:24           ` Alexander Graf
2010-02-16 11:16             ` OHMURA Kei
2010-02-16 11:18               ` Alexander Graf
2010-02-17  9:42                 ` OHMURA Kei
2010-02-17  9:46                   ` Alexander Graf
2010-02-18  5:57                     ` OHMURA Kei
2010-02-18 10:30                       ` Alexander Graf
2010-02-17  9:47                   ` Avi Kivity
2010-02-17  9:49                     ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B72D774.80807@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=ohmura.kei@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).