From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT8qt-00089w-Kt for qemu-devel@nongnu.org; Tue, 09 Feb 2016 09:01:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT8qq-0006PO-92 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 09:01:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT8qq-0006PK-0u for qemu-devel@nongnu.org; Tue, 09 Feb 2016 09:01:08 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 84E92C00230B for ; Tue, 9 Feb 2016 14:01:07 +0000 (UTC) Date: Tue, 9 Feb 2016 14:01:05 +0000 From: Stefan Hajnoczi Message-ID: <20160209140105.GG6510@stefanha-x1.localdomain> References: <1455018374-4706-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="reI/iBAAp9kzkmX4" Content-Disposition: inline In-Reply-To: <1455018374-4706-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 00/16] aio: first part of aio_context_acquire/release pushdown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org --reI/iBAAp9kzkmX4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 09, 2016 at 12:45:58PM +0100, Paolo Bonzini wrote: > This is the infrastructure part of the aio_context_acquire/release pushdo= wn, > which in turn is the first step towards a real multiqueue block layer in > QEMU. The next step is to touch all the drivers and move calls to the > aio_context_acquire/release functions from aio-*.c to the drivers. This > will be done in a separate patch series, which I plan to post before soft > freeze. >=20 > While the inserted lines are a lot, more than half of it are in documenta= tion > and formal models of the code, as well as in the implementation of the new > "lockcnt" synchronization primitive. The code is also very heavily comme= nted. >=20 > The first four patches are new, as the issue they fix was found after pos= ting > the previous patch. Everything else is more or less the same as before. >=20 > Paolo >=20 > v1->v2: Update documentation [Stefan] > Remove g_usleep from testcase [Stefan] >=20 > v2->v3: Fix broken sentence [Eric] > Use osdep.h [Eric] > (v2->v3 diff after diffstat) >=20 > Paolo Bonzini (16): > aio: introduce aio_context_in_iothread > aio: do not really acquire/release the main AIO context > aio: introduce aio_poll_internal > aio: only call aio_poll_internal from iothread > iothread: release AioContext around aio_poll > qemu-thread: introduce QemuRecMutex > aio: convert from RFifoLock to QemuRecMutex > aio: rename bh_lock to list_lock > qemu-thread: introduce QemuLockCnt > aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh > qemu-thread: optimize QemuLockCnt with futexes on Linux > aio: tweak walking in dispatch phase > aio-posix: remove walking_handlers, protecting AioHandler list with > list_lock > aio-win32: remove walking_handlers, protecting AioHandler list with > list_lock > aio: document locking > aio: push aio_context_acquire/release down to dispatching >=20 > aio-posix.c | 86 +++++---- > aio-win32.c | 106 ++++++----- > async.c | 278 ++++++++++++++++++++++++---- > block/io.c | 14 +- > docs/aio_poll_drain.promela | 210 +++++++++++++++++++++ > docs/aio_poll_drain_bug.promela | 158 ++++++++++++++++ > docs/aio_poll_sync_io.promela | 88 +++++++++ > docs/lockcnt.txt | 342 ++++++++++++++++++++++++++++++++++ > docs/multiple-iothreads.txt | 63 ++++--- > include/block/aio.h | 69 ++++--- > include/qemu/futex.h | 36 ++++ > include/qemu/rfifolock.h | 54 ------ > include/qemu/thread-posix.h | 6 + > include/qemu/thread-win32.h | 10 + > include/qemu/thread.h | 23 +++ > iothread.c | 20 +- > stubs/iothread-lock.c | 5 + > tests/.gitignore | 1 - > tests/Makefile | 2 - > tests/test-aio.c | 22 ++- > tests/test-rfifolock.c | 91 --------- > trace-events | 10 + > util/Makefile.objs | 2 +- > util/lockcnt.c | 395 ++++++++++++++++++++++++++++++++++= ++++++ > util/qemu-thread-posix.c | 38 ++-- > util/qemu-thread-win32.c | 25 +++ > util/rfifolock.c | 78 -------- > 27 files changed, 1782 insertions(+), 450 deletions(-) > create mode 100644 docs/aio_poll_drain.promela > create mode 100644 docs/aio_poll_drain_bug.promela > create mode 100644 docs/aio_poll_sync_io.promela > create mode 100644 docs/lockcnt.txt > create mode 100644 include/qemu/futex.h > delete mode 100644 include/qemu/rfifolock.h > delete mode 100644 tests/test-rfifolock.c > create mode 100644 util/lockcnt.c > delete mode 100644 util/rfifolock.c I'm getting the following with mingw: util/qemu-thread-win32.c:87:6: error: conflicting types for 'qemu_rec_mutex= _destroy' void qemu_rec_mutex_destroy(QemuRecMutex *mutex) ^ In file included from /home/stefanha/qemu/include/qemu/thread.h:16:0, from util/qemu-thread-win32.c:15: /home/stefanha/qemu/include/qemu/thread-win32.h:15:6: note: previous declar= ation of 'qemu_rec_mutex_destroy' was here void qemu_rec_mutex_destroy(QemuMutex *mutex); ^ --reI/iBAAp9kzkmX4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWufEhAAoJEJykq7OBq3PIupUH/3b2br1UmLipF1OKcsBSP7ic 0xVIT4CZQHqQNujA7mjsZEPheY3A3AGMLOZnQUiWU8a/yjDLEnoW5l9OCZ1bdSD7 016qn5CIQEv9dEaGnwEWBZieSPF+8S7PEq6mJ/Ls34bItkDJF4UkN+rweaJJi0bP B3GXC6RA/HqjldHTuHasfx+mftS4HhrdDFh0iDNhNdDrumZeYHD07EBPZgl7lk7e BgX7JAlySN2PWWfxQu3wZiTEjRB65VTEiy1DWgH08eXRjVHHVJbP3gkhJSAr3v/x wgB+NVSl5NAzP4b/W/nn1H1vlkpUw3ObMttc6QJnKgsz5kvjDpd7FGvF0dXh5w8= =LyyC -----END PGP SIGNATURE----- --reI/iBAAp9kzkmX4--