From: Gerd Hoffmann <kraxel@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.
Date: Mon, 03 Apr 2017 14:42:15 +0200 [thread overview]
Message-ID: <1491223335.17505.48.camel@redhat.com> (raw)
In-Reply-To: <b8daec8e-86ed-56e6-d42d-d948508e5b6f@ilande.co.uk>
On Mo, 2017-04-03 at 13:24 +0100, Mark Cave-Ayland wrote:
> 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?
The code copy doesn't operate on bits but on bitmap longs, so I can just
copy the whole long instead of fiddeling with bits. So I round down to
a bitmap long start. On 64bit hosts that are units of 64 pages.
Actually querying the copied bitmap operates on page granularity of
course.
> Otherwise you end up expanding the range of your last address
> considerably beyond the next page alignment.
Yes, it's larger, but as it expands to the start of the long word I
expect the penalty is almost zero (same cache line) and being able to
just copy the whole long instead of dealing with individual bits should
be a win.
> 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?
shift by BITS_PER_LEVEL is the same as division by BITS_PER_LONG
cheers,
Gerd
next prev parent reply other threads:[~2017-04-03 12:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 6:55 [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe Gerd Hoffmann
2017-03-30 6:55 ` [Qemu-devel] [RfC PATCH 1/4] vga: add vga_scanline_invalidated helper Gerd Hoffmann
2017-03-30 6:55 ` [Qemu-devel] [RfC PATCH 2/4] memory: add support getting and using a dirty bitmap copy Gerd Hoffmann
2017-03-30 15:48 ` Paolo Bonzini
2017-03-31 11:44 ` Paolo Bonzini
2017-03-30 6:55 ` [Qemu-devel] [RfC PATCH 3/4] vga: make display updates thread safe Gerd Hoffmann
2017-03-30 6:55 ` [Qemu-devel] [RfC PATCH 4/4] [testing] console: remove do_safe_dpy_refresh Gerd Hoffmann
2017-03-30 11:14 ` [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe Mark Cave-Ayland
2017-03-30 13:41 ` Gerd Hoffmann
2017-04-03 5:26 ` Mark Cave-Ayland
2017-04-03 8:44 ` Gerd Hoffmann
2017-04-03 9:18 ` Mark Cave-Ayland
2017-04-03 11:49 ` Paolo Bonzini
2017-04-03 12:03 ` Gerd Hoffmann
2017-04-03 12:24 ` Mark Cave-Ayland
2017-04-03 12:42 ` Gerd Hoffmann [this message]
2017-04-03 15:06 ` Mark Cave-Ayland
2017-04-04 6:12 ` Gerd Hoffmann
2017-04-04 7:25 ` Mark Cave-Ayland
2017-04-03 17:02 ` Paolo Bonzini
2017-04-04 6:13 ` Gerd Hoffmann
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=1491223335.17505.48.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.