qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages
Date: Tue, 12 Mar 2013 13:02:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

Il 12/03/2013 12:51, Peter Lieven ha scritto:
>> > buffer_is_zero is used in somewhat special cases (block
>> > streaming/copy-on-read) where throughput doesn't really matter, unlike
>> > is_dup_page/find_zero_bit which are used in migration.  But you can use
>> > similar code for is_dup_page and buffer_is_zero.
> ok, i will prepare a patch series for review. at the moment without touching
> is_dup_page(). you can decide later if you use buffer_Is_zero to check
> for zero pages later (maybe if the first x-bit are zero).
> 
> Two comments on changing is_dup_page() to is_zero_page():
> a) Would it make sense to only check for zero pages in the first (bulk) round?

Interesting idea.  Benchmark it. :)

> b) Would it make sense to not transfer zero pages at all in the first round?

Perhaps yes, but I'm not sure how to efficiently implement it.  There
really isn't a well-specified first round in the RAM migration code.  Of
course you could have another bitmap for known-zero pages.

But zero pages should be rare in real-world testcases, except for
ballooned pages.  The OS should try to use free memory for caches.

> The memory at the target should read as zero (not allocated) anyway.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]