qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: ali saeedi <ali.saeedi56@gmail.com>
Cc: qemu-devel@nongnu.org, pbonzini@gapps.redhat.com,
	Juan Quintela <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] bitmap
Date: Mon, 22 May 2017 16:45:01 +0100	[thread overview]
Message-ID: <20170522154501.GA2925@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAGKXQyeuP6Oqar4R3Yuy2Y2O=Bg-=wM+wsxmaZGLt9=7fdSmmg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

On Mon, May 22, 2017 at 06:00:12PM +0430, ali saeedi wrote:
> does this code 'atomic_rcu_read(&migration_bitmap_rcu)->bmap' return bitmap
> of dirty blocks or bitmap of pages?

This code changed recently.  Please refer to qemu.git/master when asking
questions on qemu-devel.

I think you're asking about what is now RAMBlock->bmap.  This bitmap
describes pages (each page is TARGET_PAGE_SIZE bytes).

This comment looks outdated, I don't think it returns a byte offset:

/**
 * migration_bitmap_find_dirty: find the next dirty page from start
 *
 * Called with rcu_read_lock() to protect migration_bitmap
 *
 * Returns the byte offset within memory region of the start of a dirty page
 *
 * @rs: current RAM state
 * @rb: RAMBlock where to search for dirty pages
 * @start: page where we start the search
 */
static inline
unsigned long migration_bitmap_find_dirty(RAMState *rs, RAMBlock *rb,
                                          unsigned long start)

Evidence:

static bool find_dirty_block(RAMState *rs, PageSearchStatus *pss, bool *again)
{
    pss->page = migration_bitmap_find_dirty(rs, pss->block, pss->page);
    ...
    if ((pss->page << TARGET_PAGE_BITS) >= pss->block->used_length) {

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2017-05-22 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 13:30 [Qemu-devel] bitmap ali saeedi
2017-05-22 15:45 ` Stefan Hajnoczi [this message]
2017-05-23 11:24   ` Juan Quintela

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=20170522154501.GA2925@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=ali.saeedi56@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@gapps.redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).