From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DE10C433EF for ; Tue, 7 Dec 2021 13:24:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.241091.417919 (Exim 4.92) (envelope-from ) id 1muaSV-0004LX-6X; Tue, 07 Dec 2021 13:24:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 241091.417919; Tue, 07 Dec 2021 13:24:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muaSV-0004LQ-2i; Tue, 07 Dec 2021 13:24:39 +0000 Received: by outflank-mailman (input) for mailman id 241091; Tue, 07 Dec 2021 13:24:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muaST-0004L1-OU for xen-devel@lists.xenproject.org; Tue, 07 Dec 2021 13:24:37 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 04fe7926-5761-11ec-a831-37629979565c; Tue, 07 Dec 2021 14:24:35 +0100 (CET) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-85-pq0CVYb0N9-a5LHy6DfeXw-1; Tue, 07 Dec 2021 08:24:31 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35D621B2C981; Tue, 7 Dec 2021 13:24:29 +0000 (UTC) Received: from localhost (unknown [10.39.194.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3765276612; Tue, 7 Dec 2021 13:23:37 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 04fe7926-5761-11ec-a831-37629979565c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638883474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2isEaCd6xk+f4LxeTB/xnxK27KBL9Gzn5hEP87ohGk=; b=K9Kw4gYbiqKvwaxtXtLmibEbGmcL02Rkgllho55+fvcLfhh1hRquX+6SL7y3Tgf98cGeW2 worgxb943zmHilFavZldmtgfDOa5eYz8sXDJT5mh6g3STN3VlMLqbd7HXN3bUlLWkJ/2qI P8bRcKpwUEQlDQr5h7txQATRYwiBwZc= X-MC-Unique: pq0CVYb0N9-a5LHy6DfeXw-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , "Dr. David Alan Gilbert" , Julia Suvorova , "Michael S. Tsirkin" , Paolo Bonzini , Juan Quintela , xen-devel@lists.xenproject.org, Aarushi Mehta , Stefan Weil , Stefano Stabellini , Coiby Xu , "Richard W.M. Jones" , Stefano Garzarella , Kevin Wolf , Anthony Perard , Stefan Hajnoczi , Hanna Reitz , qemu-block@nongnu.org, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Durrant , Ronnie Sahlberg , Peter Lieven Subject: [PATCH v3 0/6] aio-posix: split poll check from ready handler Date: Tue, 7 Dec 2021 13:23:30 +0000 Message-Id: <20211207132336.36627-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable v3:=0D - Fixed FUSE export aio_set_fd_handler() call that I missed and double-chec= ked=0D for any other missing call sites using Coccinelle [Rich]=0D v2:=0D - Cleaned up unused return values in nvme and virtio-blk [Stefano]=0D - Documented try_poll_mode() ready_list argument [Stefano]=0D - Unified virtio-blk/scsi dataplane and non-dataplane virtqueue handlers [S= tefano]=0D =0D The first patch improves AioContext's adaptive polling execution time=0D measurement. This can result in better performance because the algorithm ma= kes=0D better decisions about when to poll versus when to fall back to file descri= ptor=0D monitoring.=0D =0D The remaining patches unify the virtio-blk and virtio-scsi dataplane and=0D non-dataplane virtqueue handlers. This became possible because the dataplan= e=0D handler function now has the same function signature as the non-dataplane= =0D handler function. Stefano Garzarella prompted me to make this refactoring.= =0D =0D Stefan Hajnoczi (6):=0D aio-posix: split poll check from ready handler=0D virtio: get rid of VirtIOHandleAIOOutput=0D virtio-blk: drop unused virtio_blk_handle_vq() return value=0D virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane=0D virtio: use ->handle_output() instead of ->handle_aio_output()=0D virtio: unify dataplane and non-dataplane ->handle_output()=0D =0D include/block/aio.h | 4 +-=0D include/hw/virtio/virtio-blk.h | 2 +-=0D include/hw/virtio/virtio.h | 5 +-=0D util/aio-posix.h | 1 +=0D block/curl.c | 11 ++--=0D block/export/fuse.c | 4 +-=0D block/io_uring.c | 19 ++++---=0D block/iscsi.c | 4 +-=0D block/linux-aio.c | 16 +++---=0D block/nfs.c | 6 +--=0D block/nvme.c | 51 ++++++++++++-------=0D block/ssh.c | 4 +-=0D block/win32-aio.c | 4 +-=0D hw/block/dataplane/virtio-blk.c | 16 +-----=0D hw/block/virtio-blk.c | 14 ++----=0D hw/scsi/virtio-scsi-dataplane.c | 60 +++-------------------=0D hw/scsi/virtio-scsi.c | 2 +-=0D hw/virtio/virtio.c | 73 +++++++++------------------=0D hw/xen/xen-bus.c | 6 +--=0D io/channel-command.c | 6 ++-=0D io/channel-file.c | 3 +-=0D io/channel-socket.c | 3 +-=0D migration/rdma.c | 8 +--=0D tests/unit/test-aio.c | 4 +-=0D util/aio-posix.c | 89 +++++++++++++++++++++++++--------=0D util/aio-win32.c | 4 +-=0D util/async.c | 10 +++-=0D util/main-loop.c | 4 +-=0D util/qemu-coroutine-io.c | 5 +-=0D util/vhost-user-server.c | 11 ++--=0D 30 files changed, 219 insertions(+), 230 deletions(-)=0D =0D --=20=0D 2.33.1=0D =0D From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82C9FC433F5 for ; Tue, 7 Dec 2021 13:27:16 +0000 (UTC) Received: from localhost ([::1]:49422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muaV0-0003PI-4S for qemu-devel@archiver.kernel.org; Tue, 07 Dec 2021 08:27:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muaSW-0000ln-68 for qemu-devel@nongnu.org; Tue, 07 Dec 2021 08:24:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:47156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muaSR-0005yX-Ip for qemu-devel@nongnu.org; Tue, 07 Dec 2021 08:24:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638883474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2isEaCd6xk+f4LxeTB/xnxK27KBL9Gzn5hEP87ohGk=; b=K9Kw4gYbiqKvwaxtXtLmibEbGmcL02Rkgllho55+fvcLfhh1hRquX+6SL7y3Tgf98cGeW2 worgxb943zmHilFavZldmtgfDOa5eYz8sXDJT5mh6g3STN3VlMLqbd7HXN3bUlLWkJ/2qI P8bRcKpwUEQlDQr5h7txQATRYwiBwZc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-85-pq0CVYb0N9-a5LHy6DfeXw-1; Tue, 07 Dec 2021 08:24:31 -0500 X-MC-Unique: pq0CVYb0N9-a5LHy6DfeXw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35D621B2C981; Tue, 7 Dec 2021 13:24:29 +0000 (UTC) Received: from localhost (unknown [10.39.194.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3765276612; Tue, 7 Dec 2021 13:23:37 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PATCH v3 0/6] aio-posix: split poll check from ready handler Date: Tue, 7 Dec 2021 13:23:30 +0000 Message-Id: <20211207132336.36627-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=170.10.129.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.619, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Stefan Hajnoczi , "Michael S. Tsirkin" , Stefano Stabellini , qemu-block@nongnu.org, Juan Quintela , Paul Durrant , Anthony Perard , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefano Garzarella , Peter Lieven , Stefan Weil , Julia Suvorova , "Dr. David Alan Gilbert" , Ronnie Sahlberg , Aarushi Mehta , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , "Richard W.M. Jones" , Coiby Xu , Hanna Reitz , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" v3:=0D - Fixed FUSE export aio_set_fd_handler() call that I missed and double-chec= ked=0D for any other missing call sites using Coccinelle [Rich]=0D v2:=0D - Cleaned up unused return values in nvme and virtio-blk [Stefano]=0D - Documented try_poll_mode() ready_list argument [Stefano]=0D - Unified virtio-blk/scsi dataplane and non-dataplane virtqueue handlers [S= tefano]=0D =0D The first patch improves AioContext's adaptive polling execution time=0D measurement. This can result in better performance because the algorithm ma= kes=0D better decisions about when to poll versus when to fall back to file descri= ptor=0D monitoring.=0D =0D The remaining patches unify the virtio-blk and virtio-scsi dataplane and=0D non-dataplane virtqueue handlers. This became possible because the dataplan= e=0D handler function now has the same function signature as the non-dataplane= =0D handler function. Stefano Garzarella prompted me to make this refactoring.= =0D =0D Stefan Hajnoczi (6):=0D aio-posix: split poll check from ready handler=0D virtio: get rid of VirtIOHandleAIOOutput=0D virtio-blk: drop unused virtio_blk_handle_vq() return value=0D virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane=0D virtio: use ->handle_output() instead of ->handle_aio_output()=0D virtio: unify dataplane and non-dataplane ->handle_output()=0D =0D include/block/aio.h | 4 +-=0D include/hw/virtio/virtio-blk.h | 2 +-=0D include/hw/virtio/virtio.h | 5 +-=0D util/aio-posix.h | 1 +=0D block/curl.c | 11 ++--=0D block/export/fuse.c | 4 +-=0D block/io_uring.c | 19 ++++---=0D block/iscsi.c | 4 +-=0D block/linux-aio.c | 16 +++---=0D block/nfs.c | 6 +--=0D block/nvme.c | 51 ++++++++++++-------=0D block/ssh.c | 4 +-=0D block/win32-aio.c | 4 +-=0D hw/block/dataplane/virtio-blk.c | 16 +-----=0D hw/block/virtio-blk.c | 14 ++----=0D hw/scsi/virtio-scsi-dataplane.c | 60 +++-------------------=0D hw/scsi/virtio-scsi.c | 2 +-=0D hw/virtio/virtio.c | 73 +++++++++------------------=0D hw/xen/xen-bus.c | 6 +--=0D io/channel-command.c | 6 ++-=0D io/channel-file.c | 3 +-=0D io/channel-socket.c | 3 +-=0D migration/rdma.c | 8 +--=0D tests/unit/test-aio.c | 4 +-=0D util/aio-posix.c | 89 +++++++++++++++++++++++++--------=0D util/aio-win32.c | 4 +-=0D util/async.c | 10 +++-=0D util/main-loop.c | 4 +-=0D util/qemu-coroutine-io.c | 5 +-=0D util/vhost-user-server.c | 11 ++--=0D 30 files changed, 219 insertions(+), 230 deletions(-)=0D =0D --=20=0D 2.33.1=0D =0D