[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the po
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue |
Date: |
Sat, 04 Oct 2014 20:04:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 |
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
> + /*
> + * Don't break host-page chunks up with queue items
> + * so only unqueue if,
> + * a) The last item came from the queue anyway
> + * b) The last sent item was the last target-page in a host page
> + */
> + if (last_was_from_queue || (!last_sent_block) ||
Extra parentheses. Is the last_was_from_queue check necessary? Or
would one of the other checks be true anyway if last_was_from_queue is true?
> + /* We're sending this page, and since it's postcopy nothing else
> + * will dirty it, and we must make sure it doesn't get sent
> again.
> + */
> + if (!migration_bitmap_clear_dirty(bitoffset <<
> TARGET_PAGE_BITS)) {
> + DPRINTF("%s: Not dirty for postcopy %s/%zx bito=%zx
> (sent=%d)",
> + __func__, tmpblock->idstr, tmpoffset, bitoffset,
> + test_bit(bitoffset, ms->sentmap));
If a DPRINTF occurs in a loop, please change it to a tracepoint.
This function looks like a candidate for cleaning its logic up and/or
splitting it. But it can be done later by the poor soul who will touch
it next. :)
Paolo
- [Qemu-devel] [PATCH v4 33/47] Postcopy: Postcopy startup in migration thread, (continued)
[Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2014/10/03
- Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue,
Paolo Bonzini <=
[Qemu-devel] [PATCH v4 38/47] Add assertion to check migration_dirty_pages, Dr. David Alan Gilbert (git), 2014/10/03
[Qemu-devel] [PATCH v4 40/47] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2014/10/03
[Qemu-devel] [PATCH v4 41/47] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2014/10/03
[Qemu-devel] [PATCH v4 42/47] Don't sync dirty bitmaps in postcopy, Dr. David Alan Gilbert (git), 2014/10/03
[Qemu-devel] [PATCH v4 43/47] Host page!=target page: Cleanup bitmaps, Dr. David Alan Gilbert (git), 2014/10/03
[Qemu-devel] [PATCH v4 44/47] Postcopy; Handle userfault requests, Dr. David Alan Gilbert (git), 2014/10/03