[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/14] buffered_file: don't flush on put buffer
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 11/14] buffered_file: don't flush on put buffer |
Date: |
Fri, 21 Sep 2012 17:34:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 21/09/2012 16:08, Juan Quintela ha scritto:
> We call buffered_put_buffer with iothread held, and buffered_flush() does
> synchronous writes. We only want to do the synchronous writes outside.
>
> Signed-off-by: Juan Quintela <address@hidden>
> ---
> buffered_file.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/buffered_file.c b/buffered_file.c
> index f4a788d..929b911 100644
> --- a/buffered_file.c
> +++ b/buffered_file.c
> @@ -107,12 +107,6 @@ static int buffered_put_buffer(void *opaque, const
> uint8_t *buf, int64_t pos, in
> buffered_append(s, buf, size);
> }
>
> - error = buffered_flush(s);
> - if (error < 0) {
> - DPRINTF("buffered flush error. bailing: %s\n", strerror(-error));
> - return error;
> - }
> -
> return size;
> }
>
This means that the buffer can grow to up to s->xfer_limit bytes.
Perhaps you want to make the granularity (currently fixed to 100ms) a
bit smaller, like 20-30 ms, if the bandwidth limit grows above say 100
MB/sec? This can be done on top of this series however.
Reviewed-by: Paolo Bonzini <address@hidden>
- [Qemu-devel] [PATCH 14/14] migration: print times for end phase, (continued)
- [Qemu-devel] [PATCH 14/14] migration: print times for end phase, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 10/14] buffered_file: Unfold the trick to restart generating migration data, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 12/14] buffered_file: unfold buffered_append in buffered_put_buffer, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 06/14] migration: stop all cpus correctly, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 11/14] buffered_file: don't flush on put buffer, Juan Quintela, 2012/09/21
- Re: [Qemu-devel] [PATCH 11/14] buffered_file: don't flush on put buffer,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 07/14] migration: make writes blocking, Juan Quintela, 2012/09/21