qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 10/10] Maintaing number of dirty pages


From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCH 10/10] Maintaing number of dirty pages
Date: Wed, 01 Dec 2010 16:46:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6

On 11/30/2010 04:46 PM, Juan Quintela wrote:
Anthony Liguori<address@hidden>  wrote:
>  On 11/23/2010 05:03 PM, Juan Quintela wrote:
>>  From: Juan Quintela<address@hidden>
>>
>>  Calculate the number of dirty pages takes a lot on hosts with lots
>>  of memory.  Just maintain how many pages are dirty.  Only sync bitmaps
>>  if number is small enough.
>>
>
>  There needs to be numbers that justify this as part of the commit message.

They are on patch 0/6.

Additionally, with 64GB of RAM, this bitmap is HUGE, having to walk over
it in each ram_save_live() call is too onerous.

It's not so huge. It's scaled down by a factor of 8 * 4096 = 32K. So it's a 2MB bitmap. If kept as a bitmap and accessed in longs, it can be read in less than a millisecond.

An optimization can be to look at the previous ram_save_live (which had to walk the bitmap). If old_nr_dirty > 4*target_nr_dirty, assume we need one more pass and don't scan the bitmap.

Another optimization is to stop the count when we reach the target; instead of ram_save_remaining() have a ram_save_may_stop() which counts the number of dirty bits until it reaches target_nr_dirty or exhausts the bitmap.

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




reply via email to

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