Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Eric Blake
On 05/26/2015 01:10 PM, Alberto Garcia wrote: > On Tue 26 May 2015 08:52:41 PM CEST, Eric Blake wrote: > >>> +# @cache-clean-interval: #optional clean unused entries in the L2 and >>> refcount >>> +# caches. The interval is in seconds (since 2.4) >>> +# >>> # Since: 1.7

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 08:52:41 PM CEST, Eric Blake wrote: >> +# @cache-clean-interval: #optional clean unused entries in the L2 and >> refcount >> +# caches. The interval is in seconds (since 2.4) >> +# >> # Since: 1.7 > > Is there any QMP command that can query the curren

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Eric Blake
On 05/26/2015 11:14 AM, Alberto Garcia wrote: > This adds a new 'cache-clean-interval' option that cleans all qcow2 > cache entries that haven't been used in a certain interval, given in > seconds. > > This allows setting a large L2 cache size so it can handle scenarios > with lots of I/O and at t

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Max Reitz
On 26.05.2015 19:14, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time

[Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Alberto Garcia
This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time use little memory during periods of inactivit

[Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Alberto Garcia
Changing the current ordering saves 8 bytes per cache entry in x86_64. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index a215f5b..43590ff 100644 --- a/b

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

[Qemu-block] [PATCH v2 0/3] Clean unused entries in the qcow2 L2/refcount cache

2015-05-26 Thread Alberto Garcia
New version of the series. v2: - Clarify that the block-commit mentioned in the first patch refers to the HMP commit command. - Check the value of cache_clean_interval and cast it accordingly to prevent it from overflowing. v1: https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg03510.ht

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 06:10:11 PM CEST, Max Reitz wrote: > On 18.05.2015 18:48, Alberto Garcia wrote: >> Changing the current ordering saves 8 bytes per cache entry in x86_64. > > Hm, not seven? No, the size is 32 before the patch and 24 afterwards. What you save is the 7 bytes of padding after 'dir

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Max Reitz
On 26.05.2015 18:12, Eric Blake wrote: On 05/26/2015 10:10 AM, Max Reitz wrote: On 18.05.2015 18:48, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Hm, not seven? Signed-off-by: Alberto Garcia --- block/qcow2-cache.c | 2 +- 1 file changed,

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Eric Blake
On 05/18/2015 10:48 AM, Alberto Garcia wrote: > Changing the current ordering saves 8 bytes per cache entry in x86_64. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat c

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Eric Blake
On 05/26/2015 10:10 AM, Max Reitz wrote: > On 18.05.2015 18:48, Alberto Garcia wrote: >> Changing the current ordering saves 8 bytes per cache entry in x86_64. > > Hm, not seven? > >> Signed-off-by: Alberto Garcia >> --- >> block/qcow2-cache.c | 2 +- >> 1 file changed, 1 insertion(+), 1 dele

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Max Reitz
On 18.05.2015 18:48, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Hm, not seven? Signed-off-by: Alberto Garcia --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cach

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Max Reitz
On 18.05.2015 18:48, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Max Reitz
On 26.05.2015 17:51, Alberto Garcia wrote: On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. Looks go

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz wrote: >> After having emptied the cache, the data in the cache tables is no >> longer useful, so we can tell the kernel that we are done with it. In >> Linux this frees the resources associated with it. > Looks good, but by applying the same logic,

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Max Reitz
On 18.05.2015 18:48, Alberto Garcia wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the block-commit operation: it

Re: [Qemu-block] [PATCH v6 01/13] block: Add op blocker type "device IO"

2015-05-26 Thread Max Reitz
On 26.05.2015 16:22, Kevin Wolf wrote: Am 21.05.2015 um 08:42 hat Fam Zheng geschrieben: It blocks device IO. What I'm missing here is a description of the case that it protects against. Blocking device I/O doesn't sound like a valid thing to want per se, but it might be true that we need it as

Re: [Qemu-block] [PATCH v6 01/13] block: Add op blocker type "device IO"

2015-05-26 Thread Kevin Wolf
Am 21.05.2015 um 08:42 hat Fam Zheng geschrieben: > It blocks device IO. What I'm missing here is a description of the case that it protects against. Blocking device I/O doesn't sound like a valid thing to want per se, but it might be true that we need it as long as we don't have the "real" op blo

Re: [Qemu-block] [PATCH v6 12/13] block: Block "device IO" during bdrv_drain and bdrv_drain_all

2015-05-26 Thread Max Reitz
On 25.05.2015 04:48, Fam Zheng wrote: On Sat, 05/23 19:11, Max Reitz wrote: On 21.05.2015 08:43, Fam Zheng wrote: We don't want new requests from guest, so block the operation around the nested poll. It also avoids looping forever when iothread is submitting a lot of requests. Signed-off-by:

Re: [Qemu-block] [PATCH] qemu-iotests: Fix 128 if sudo required

2015-05-26 Thread Kevin Wolf
Am 19.05.2015 um 12:46 hat Fam Zheng geschrieben: > If passwordless "sudo" works, use it in the qemu-io cmd. > > Signed-off-by: Fam Zheng Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH] iotests: remove assertIsNotNone call

2015-05-26 Thread Kevin Wolf
Am 22.05.2015 um 18:01 hat John Snow geschrieben: > RHEL6 doesn't have Python 2.7, so replace this call with > assertNotEqual(x, None) which will work just as well. > > Reported-by: Kevin Wolf > Signed-off-by: John Snow Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [Qemu-devel] [PULL 00/22] Block layer core and image format patches

2015-05-26 Thread Peter Maydell
On 22 May 2015 at 16:26, Kevin Wolf wrote: > The following changes since commit 8b6db32a4ec47d1171ccfa21d557096b99f4eef0: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-05-22 13:25:40 +0100) > > are available in the git repository at: > > > gi

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Paolo Bonzini
On 26/05/2015 12:06, Kevin Wolf wrote: > Am 26.05.2015 um 11:44 hat Paolo Bonzini geschrieben: >> >> >> On 26/05/2015 11:37, Kevin Wolf wrote: If we run into a timeout we theoretically have the following options: - reconnect - retry - error I would reconnect as Ro

Re: [Qemu-block] [PATCH] iotests: remove assertIsNotNone call

2015-05-26 Thread Stefan Hajnoczi
On Fri, May 22, 2015 at 12:01:41PM -0400, John Snow wrote: > RHEL6 doesn't have Python 2.7, so replace this call with > assertNotEqual(x, None) which will work just as well. > > Reported-by: Kevin Wolf > Signed-off-by: John Snow > --- > tests/qemu-iotests/124 | 2 +- > 1 file changed, 1 inserti

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 26.05.2015 um 11:44 hat Paolo Bonzini geschrieben: > > > On 26/05/2015 11:37, Kevin Wolf wrote: > > > If we run into a timeout we theoretically have the following options: > > > - reconnect > > > - retry > > > - error > > > > > > I would reconnect as Ronnie proposed. > > > > Just trying t

Re: [Qemu-block] [PATCH v5 1/8] block: Add bdrv_get_block_status_above

2015-05-26 Thread Fam Zheng
On Tue, 05/26 11:22, Paolo Bonzini wrote: > > > On 26/05/2015 05:36, Fam Zheng wrote: > > Like bdrv_is_allocated_above, this function follows the backing chain until > > seeing > > BDRV_BLOCK_ALLOCATED. Base is not included. > > > > Reimplement bdrv_is_allocated on top. > > > > Signed-off-by:

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Paolo Bonzini
On 26/05/2015 11:37, Kevin Wolf wrote: > > If we run into a timeout we theoretically have the following options: > > - reconnect > > - retry > > - error > > > > I would reconnect as Ronnie proposed. > > Just trying to reconnect indefinitely might not be the best option. > Consider the situat

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 26.05.2015 um 11:30 hat Peter Lieven geschrieben: > Am 26.05.2015 um 11:01 schrieb Kevin Wolf: > >Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: > >>Hi, > >> > >>next libiscsi version will allow to define command timeouts. At least for > >>sync commands this > >>was in fact possible since

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Peter Lieven
Am 26.05.2015 um 11:01 schrieb Kevin Wolf: Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in 2013. Per default this timeout is disabled. I would like to

Re: [Qemu-block] [PATCH v5 1/8] block: Add bdrv_get_block_status_above

2015-05-26 Thread Paolo Bonzini
On 26/05/2015 05:36, Fam Zheng wrote: > Like bdrv_is_allocated_above, this function follows the backing chain until > seeing > BDRV_BLOCK_ALLOCATED. Base is not included. > > Reimplement bdrv_is_allocated on top. > > Signed-off-by: Fam Zheng > --- > block/io.c| 53 > +++

Re: [Qemu-block] [PATCH] MAINTAINERS: Add header files to Block Layer Core section

2015-05-26 Thread Stefan Hajnoczi
On Wed, May 20, 2015 at 12:05:55PM +0200, Kevin Wolf wrote: > Suggested-by: Markus Armbruster > Signed-off-by: Kevin Wolf > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi pgpDxpVWxyTO2.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/13] netmap: Drop netmap_can_send

2015-05-26 Thread Stefan Hajnoczi
On Mon, May 25, 2015 at 11:51:23AM +0800, Fam Zheng wrote: > On Tue, 05/19 15:54, Stefan Hajnoczi wrote: > > On Tue, May 19, 2015 at 10:51:01AM +, Fam Zheng wrote: > > > This callback is called by main loop before polling s->fd, if it returns > > > false, the fd will not be polled in this itera

Re: [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send

2015-05-26 Thread Stefan Hajnoczi
On Tue, May 26, 2015 at 02:52:48PM +0800, Fam Zheng wrote: > On Tue, 05/19 15:48, Stefan Hajnoczi wrote: > > On Tue, May 19, 2015 at 10:51:00AM +, Fam Zheng wrote: > > > This callback is called by main loop before polling s->fd, if it returns > > > false, the fd will not be polled in this itera

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: > Hi, > > next libiscsi version will allow to define command timeouts. At least for > sync commands this > was in fact possible since somewhen in 2013. Per default this timeout is > disabled. > > I would like to at least define a timeout for

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Peter Lieven
Am 22.05.2015 um 14:22 schrieb ronnie sahlberg: On Fri, May 22, 2015 at 12:30 AM, Peter Lieven mailto:p...@kamp.de>> wrote: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in 2013. Per default th