[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe. |
Date: |
Mon, 3 Apr 2017 13:24:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
On 03/04/17 13:03, Gerd Hoffmann wrote:
> Hi,
>
>> I checked the branch, is bitmap_copy_and_clear_atomic correct when you
>> have partial updates? Maybe you need to handle partial updates of the
>> first and last word?
>
> Should not be a problem. We might clear some more bits, but these are
> outsize the visible area so they should cause visible corruption (and if
> the visible area changes the display code needs to do a full refresh
> anyway).
Right. Also is there a reason that
cpu_physical_memory_snapshot_and_clear_dirty() uses BITS_PER_LEVEL when
calculating the alignment used for the first/last addresses? I would
have thought you can remove the align variable and use:
ram_addr_t first = QEMU_ALIGN_DOWN(start, TARGET_PAGE_SIZE);
ram_addr_t last = QEMU_ALIGN_UP(start + length, TARGET_PAGE_SIZE);
Otherwise you end up expanding the range of your last address
considerably beyond the next page alignment. And also in the main page
loop why is BITS_PER_LEVEL used? I see that several of the internal
bitmap routines appear to use BITS_PER_LONG for compressing into the
bitmap which might be more appropriate?
ATB,
Mark.