[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v4 2/5] ramlist mutex
From: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] [RFC PATCH v4 2/5] ramlist mutex |
Date: |
Tue, 23 Aug 2011 06:15:33 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Aug 16, 2011 at 11:56:37PM -0400, Umesh Deshpande wrote:
> ramlist mutex is implemented to protect the RAMBlock list traversal in the
> migration thread from their addition/removal from the iothread.
>
> Signed-off-by: Umesh Deshpande <address@hidden>
> ---
> cpu-all.h | 2 ++
> exec.c | 19 +++++++++++++++++++
> qemu-common.h | 2 ++
> 3 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/cpu-all.h b/cpu-all.h
> index 6b217a2..eab9803 100644
> --- a/cpu-all.h
> +++ b/cpu-all.h
> @@ -21,6 +21,7 @@
>
> #include "qemu-common.h"
> #include "cpu-common.h"
> +#include "qemu-thread.h"
>
> /* some important defines:
> *
> @@ -932,6 +933,7 @@ typedef struct RAMBlock {
> } RAMBlock;
>
> typedef struct RAMList {
> + QemuMutex mutex;
> uint8_t *phys_dirty;
> QLIST_HEAD(ram, RAMBlock) blocks;
> QLIST_HEAD(, RAMBlock) blocks_mru;
A comment on what the mutex protects would be good.
[Qemu-devel] [RFC PATCH v3 5/5] Making iothread block for migrate_cancel, Umesh Deshpande, 2011/08/16