From patchwork Thu Jan 19 17:24:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 13109898 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 4EDF8C05027 for ; Fri, 20 Jan 2023 14:01:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrxQ-0005YP-1N; Fri, 20 Jan 2023 09:01:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrxJ-0005QE-MS for qemu-devel@nongnu.org; Fri, 20 Jan 2023 09:01:23 -0500 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrxE-0002f9-UL for qemu-devel@nongnu.org; Fri, 20 Jan 2023 09:01:21 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-368-Fb1KLFPiOdGGSfBsjNHXBw-1; Fri, 20 Jan 2023 09:01:12 -0500 X-MC-Unique: Fb1KLFPiOdGGSfBsjNHXBw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8606185A78B; Fri, 20 Jan 2023 14:01:11 +0000 (UTC) Received: from kaod.org (unknown [10.39.192.112]) by smtp.corp.redhat.com (Postfix) with SMTP id 125AA40C2064; Fri, 20 Jan 2023 14:00:32 +0000 (UTC) From: Greg Kurz To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Dr. David Alan Gilbert" , Maxime Coquelin , Laurent Vivier , "Michael S. Tsirkin" , Yajun Wu , Peter Maydell , Parav Pandit , qemu-stable@nongnu.org, Greg Kurz Subject: [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Date: Thu, 19 Jan 2023 18:24:22 +0100 Message-Id: <20230119172424.478268-1-groug@kaod.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: softfail client-ip=205.139.111.44; envelope-from=groug@kaod.org; helo=us-smtp-delivery-44.mimecast.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The nested event loop was introduced in QEMU 6.0 to allow servicing of requests coming from the slave channel while waiting for an ack from the back-end on the master socket. It turns out this is fragile and breaks if the servicing of the slave channel causes a new message to be sent on the master socket. This is exactly what happens when using DPDK as reported in [0]. The only identified user for the nested loop is DAX enablement that isn't upstream yet. Just drop the code for now. Some more clever solution should be designed when the need to service concurrent requests from both channels arises again. Greg Kurz (2): Revert "vhost-user: Monitor slave channel in vhost_user_read()" Revert "vhost-user: Introduce nested event loop in vhost_user_read()" hw/virtio/vhost-user.c | 100 ++++------------------------------------- 1 file changed, 8 insertions(+), 92 deletions(-)