[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 21/30] migration: move exit condition to migrati
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 21/30] migration: move exit condition to migration thread |
Date: |
Fri, 26 Oct 2012 13:43:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Paolo Bonzini <address@hidden> wrote:
> Il 18/10/2012 09:30, Juan Quintela ha scritto:
>> - if (s->migration_state->complete) {
>> + qemu_mutex_lock_iothread();
>
> So, was it a bug that we were accessing ->complete without the BQL?
>
>> + if (m->state != MIG_STATE_ACTIVE) {
>> + DPRINTF("put_ready returning because of non-active state\n");
>
> The contents of the debug message obsolete. Besides, I would just put
> the two branches in the same "if (m->state != MIG_STATE_ACTIVE ||
> m->complete)".
BQL is not needed. Complete is only used by the migration thread. but
maintaing it outside of the iothread lock, makes locking even more complicated.
>
>> + qemu_mutex_unlock_iothread();
>> break;
>> }
>> + if (m->complete) {
>> + qemu_mutex_unlock_iothread();
>> + break;
>> + }
>> + qemu_mutex_unlock_iothread();
>> +
>
> Paolo
- [Qemu-devel] [PATCH 15/30] migration-fd: remove duplicate include, (continued)
- [Qemu-devel] [PATCH 15/30] migration-fd: remove duplicate include, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 23/30] migration: print times for end phase, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 16/30] migration: move buffered_file.c code into migration.c, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 24/30] ram: rename last_block to last_seen_block, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 22/30] migration: unfold rest of migrate_fd_put_ready() into thread, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 21/30] migration: move exit condition to migration thread, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 20/30] migration: move begining stage to the migration thread, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 29/30] migration: Only go to the iterate stage if there is anything to send, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 27/30] ram: Use memory_region_test_and_clear_dirty, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 25/30] ram: Add last_sent_block, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 26/30] memory: introduce memory_region_test_and_clear_dirty, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 28/30] fix memory.c, Juan Quintela, 2012/10/18
[Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking, Juan Quintela, 2012/10/18