qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com,
	ehabkost@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com,
	stefanha@redhat.com, crosa@redhat.com, den@openvz.org
Subject: [PATCH v7 0/7] coroutines: generate wrapper code
Date: Wed, 10 Jun 2020 13:03:29 +0300	[thread overview]
Message-ID: <20200610100336.23451-1-vsementsov@virtuozzo.com> (raw)

Hi all!

The aim of the series is to reduce code-duplication and writing
parameters structure-packing by hand around coroutine function wrappers.

Benefits:
 - no code duplication
 - less indirection

v7: apply Eric's suggestions
02: fix grammar in commit msg, add Eric's r-b
04: - don't create separate header for generated_co_wrapper thing
    - inline aio_wait_kick() call
    - use json.dumps to make style for clang-format
05: - drop "#include "block/generated-co-wrapper.h" (since the header is removed)
    - add Eric's r-b

Vladimir Sementsov-Ogievskiy (7):
  block: return error-code from bdrv_invalidate_cache
  block/io: refactor coroutine wrappers
  block: declare some coroutine functions in block/coroutines.h
  scripts: add coroutine-wrapper.py
  block: generate coroutine-wrapper code
  block: drop bdrv_prwv
  block/io: refactor save/load vmstate

 Makefile                     |   8 +
 block/block-gen.h            |  49 +++++
 block/coroutines.h           |  65 +++++++
 include/block/block.h        |  31 ++--
 block.c                      |  97 ++--------
 block/io.c                   | 336 +++++------------------------------
 tests/test-bdrv-drain.c      |   2 +-
 block/Makefile.objs          |   1 +
 scripts/coroutine-wrapper.py | 180 +++++++++++++++++++
 9 files changed, 388 insertions(+), 381 deletions(-)
 create mode 100644 block/block-gen.h
 create mode 100644 block/coroutines.h
 create mode 100755 scripts/coroutine-wrapper.py

-- 
2.21.0



             reply	other threads:[~2020-06-10 10:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 10:03 Vladimir Sementsov-Ogievskiy [this message]
2020-06-10 10:03 ` [PATCH v7 1/7] block: return error-code from bdrv_invalidate_cache Vladimir Sementsov-Ogievskiy
2020-06-10 10:03 ` [PATCH v7 2/7] block/io: refactor coroutine wrappers Vladimir Sementsov-Ogievskiy
2020-06-10 10:03 ` [PATCH v7 3/7] block: declare some coroutine functions in block/coroutines.h Vladimir Sementsov-Ogievskiy
2020-06-10 10:03 ` [PATCH v7 4/7] scripts: add coroutine-wrapper.py Vladimir Sementsov-Ogievskiy
2020-08-20  7:38   ` Paolo Bonzini
2020-06-10 10:03 ` [PATCH v7 5/7] block: generate coroutine-wrapper code Vladimir Sementsov-Ogievskiy
2020-06-10 10:03 ` [PATCH v7 6/7] block: drop bdrv_prwv Vladimir Sementsov-Ogievskiy
2020-06-10 10:03 ` [PATCH v7 7/7] block/io: refactor save/load vmstate Vladimir Sementsov-Ogievskiy
2020-07-27 12:48 ` [PATCH v7 0/7] coroutines: generate wrapper code Stefan Hajnoczi
2020-07-27 12:59   ` Vladimir Sementsov-Ogievskiy
2020-08-20  1:33     ` Eric Blake
2020-08-20  7:34       ` Paolo Bonzini

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=20200610100336.23451-1-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=crosa@redhat.com \
    --cc=den@openvz.org \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).