qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/8] BitmapLog: bitmap dump code via QAPI fra


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v4 3/8] BitmapLog: bitmap dump code via QAPI framework with runstates
Date: Fri, 18 Jul 2014 12:14:30 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Sanidhya Kashyap (address@hidden) wrote:

<snip>
One more I forgot:

> +    while (b->current_epoch <= b->total_epochs) {
> +        if (!runstate_check(RUN_STATE_DUMP_BITMAP) ||
> +            b->state != LOG_BITMAP_STATE_ACTIVE) {
> +            goto log_thread_end;
> +        }
> +        bitmap_zero(logging_bitmap, ram_bitmap_pages);
> +        logging_lock();
> +        dirty_bitmap_sync();
> +        logging_unlock();
> +
> +        ret = qemu_write_full(fd, logging_bitmap, bitmap_size);
> +        if (ret < bitmap_size) {
> +            b->state = LOG_BITMAP_STATE_ERROR;
> +            goto log_thread_end;
> +        }
> +
> +        ret = qemu_write_full(fd, &marker, sizeof(char));
> +        if (ret < sizeof(char)) {
> +            b->state = LOG_BITMAP_STATE_ERROR;
> +            goto log_thread_end;
> +        }
> +        g_usleep(b->current_frequency * 1000);

Be careful; lets say that was set to 20ms, you wouldn't
get 50 dumps a second, since you *add* that delay to the
rest of the time in the loop.

Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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