[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
- [Qemu-devel] [PATCH v4 0/8] Obtain dirty bitmap via VM logging, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 1/8] enable sharing of the function between migration and bitmap dump, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 2/8] RunState: added two new flags for bitmap dump and migration process, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 3/8] BitmapLog: bitmap dump code via QAPI framework with runstates, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 4/8] BitmapLog: hmp interface for dirty bitmap dump, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 5/8] BitmapLog: cancel mechanism for an already running dump bitmap process, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 6/8] BitmapLog: set the frequency of the dump bitmap process, Sanidhya Kashyap, 2014/07/17
- [Qemu-devel] [PATCH v4 7/8] BitmapLog: get the information about the parameters, Sanidhya Kashyap, 2014/07/17