qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] bitmap


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] bitmap
Date: Mon, 22 May 2017 16:45:01 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

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: signature.asc
Description: PGP signature


reply via email to

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