qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 7/7] qcow2: do decompression in threads
Date: Wed, 7 Nov 2018 00:40:31 +0100	[thread overview]
Message-ID: <e13e3b16-7efc-6560-41f6-10e54e2b27da@redhat.com> (raw)
In-Reply-To: <20181101182738.70462-8-vsementsov@virtuozzo.com>

On 01/11/2018 19:27, Vladimir Sementsov-Ogievskiy wrote:
> -/* See qcow2_compress definition for parameters description */
> -static ssize_t qcow2_co_compress(BlockDriverState *bs,
> -                                 void *dest, size_t dest_size,
> -                                 const void *src, size_t src_size)
> +static ssize_t qcow2_co_do_compress(BlockDriverState *bs,
> +                                    void *dest, size_t dest_size,
> +                                    const void *src, size_t src_size,
> +                                    Qcow2CompressFunc func)
>  {
>      BDRVQcow2State *s = bs->opaque;
>      BlockAIOCB *acb;
> @@ -3838,6 +3842,7 @@ static ssize_t qcow2_co_compress(BlockDriverState *bs,
>          .dest_size = dest_size,
>          .src = src,
>          .src_size = src_size,
> +        .func = func,
>      };
>  
>      while (s->nb_compress_threads >= MAX_COMPRESS_THREADS) {
> @@ -3860,6 +3865,22 @@ static ssize_t qcow2_co_compress(BlockDriverState *bs,
>      return arg.ret;
>  }
>  

Not a blocker for this patch, but I'll note that qcow2_co_do_compress
could use thread_pool_submit_co.  Also, qcow2_co_do_compress should be a
"coroutine_fn".

Paolo

  parent reply	other threads:[~2018-11-06 23:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 18:27 [Qemu-devel] [PATCH 0/7] qcow2 decompress in threads Vladimir Sementsov-Ogievskiy
2018-11-01 18:27 ` [Qemu-devel] [PATCH 1/7] qcow2: use Z_OK instead of 0 for deflateInit2 return code check Vladimir Sementsov-Ogievskiy
2018-11-05 15:30   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-01 18:27 ` [Qemu-devel] [PATCH 2/7] qcow2: make more generic interface for qcow2_compress Vladimir Sementsov-Ogievskiy
2018-11-05 15:45   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-01 18:27 ` [Qemu-devel] [PATCH 3/7] qcow2: move decompression from qcow2-cluster.c to qcow2.c Vladimir Sementsov-Ogievskiy
2018-11-05 15:45   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-01 18:27 ` [Qemu-devel] [PATCH 4/7] qcow2: refactor decompress_buffer Vladimir Sementsov-Ogievskiy
2018-11-06 10:45   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-01 18:27 ` [Qemu-devel] [PATCH 5/7] qcow2: use byte-based read in qcow2_decompress_cluster Vladimir Sementsov-Ogievskiy
2018-11-06 13:53   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-06 15:18     ` Vladimir Sementsov-Ogievskiy
2018-11-01 18:27 ` [Qemu-devel] [PATCH 6/7] qcow2: aio support for compressed cluster read Vladimir Sementsov-Ogievskiy
2018-11-06 15:06   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-06 15:13     ` Vladimir Sementsov-Ogievskiy
2018-11-06 15:30       ` Alberto Garcia
2018-11-06 16:24         ` Vladimir Sementsov-Ogievskiy
2018-11-09 13:51           ` Alberto Garcia
2018-11-01 18:27 ` [Qemu-devel] [PATCH 7/7] qcow2: do decompression in threads Vladimir Sementsov-Ogievskiy
2018-11-06 14:03   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-06 23:40   ` Paolo Bonzini [this message]
2018-11-12 15:32 ` [Qemu-devel] [PATCH 0/7] qcow2 decompress " Kevin Wolf
2018-11-12 16:16   ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e13e3b16-7efc-6560-41f6-10e54e2b27da@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).