From: Avi Kivity <avi@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/4] memory: change dirty setting APIs to take a size
Date: Mon, 09 Jan 2012 14:11:17 +0200 [thread overview]
Message-ID: <4F0AD965.3040305@redhat.com> (raw)
In-Reply-To: <CAAu8pHs1LLKqUhVp9cKs_ar_YRgSkH773nBouQuJbhvowV+gZw@mail.gmail.com>
On 01/08/2012 11:10 PM, Blue Swirl wrote:
> Instead of each target knowing or guessing the guest page size,
> just pass the desired size of dirtied memory area. This should also
> improve performance due to memset() optimizations.
>
> diff --git a/exec-obsolete.h b/exec-obsolete.h
> index f8af27e..019c09a 100644
> --- a/exec-obsolete.h
> +++ b/exec-obsolete.h
> @@ -76,6 +76,20 @@ static inline int
> cpu_physical_memory_set_dirty_flags(ram_addr_t addr,
> return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flags;
> }
>
> +static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,
> + int length,
> + int dirty_flags)
> +{
> + int i, len;
> + uint8_t *p;
> +
> + len = length >> TARGET_PAGE_BITS;
> + p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS);
> + for (i = 0; i < len; i++) {
> + p[i] |= dirty_flags;
> + }
> +}
> +
Breaks for start = 0xfff, length = 2.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-01-09 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-08 21:10 [Qemu-devel] [PATCH 2/4] memory: change dirty setting APIs to take a size Blue Swirl
2012-01-09 12:11 ` Avi Kivity [this message]
2012-01-22 7:40 ` Blue Swirl
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=4F0AD965.3040305@redhat.com \
--to=avi@redhat.com \
--cc=blauwirbel@gmail.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 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).