From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C86B42845; Sun, 26 Mar 2023 17:51:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4947E40DFB; Sun, 26 Mar 2023 17:51:19 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6CAF140A8A for ; Sun, 26 Mar 2023 17:51:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679845876; 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: in-reply-to:in-reply-to:references:references; bh=u52BQKgLop1LIu5vxpHyXFnYozTQDpA/tBt5jFdcNHQ=; b=D/8d5MfZYCOj+CY3SlgkGZnN2tSSO0tssi1oAH6ZuiX8EAtTFd/YL9I5I1RaRbQEFbV2Gc +y58rVu07IGSr7eRdBhaZdkADjFgkCCrA3uKMHl6uZzSx2lSfoBIS4gn1eslbqRGmlcZl6 kjsyg8jMxWxgXY1ZlAMe3HSExgGo7+E= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-467-1DXu1UDgONeW63MUN_gsmQ-1; Sun, 26 Mar 2023 11:51:15 -0400 X-MC-Unique: 1DXu1UDgONeW63MUN_gsmQ-1 Received: by mail-pf1-f199.google.com with SMTP id i7-20020a626d07000000b005d29737db06so3219090pfc.15 for ; Sun, 26 Mar 2023 08:51:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679845874; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u52BQKgLop1LIu5vxpHyXFnYozTQDpA/tBt5jFdcNHQ=; b=Ho20tTG0uiIMiO8K6oZoFyGDb70H1M2TiSvnQtW6HYNyt8fkzRmAde0ss0oJGr/P1e CGU3mCaiX5/9wFgfWVZvdfHnXhh9s8t4Iw1DlaP8NlXuHzSLrE0EtPOm+sjTFOyilsKI ZbOGychvQDF0SV4a43+4RWdtw0G1siPv4VqqhhcIwiFzswUUkHjs8YhdJKdxLbtDnNJE jFKdrKWNv1XlqKcaef4WXbvLJpTGCqm5WsFhcwSNqyzR69ulSInDQxC8YNP0ujH5+O4a 9O4L7CJt+0T+UuGwPuu2MR6YKLdLbqNjH+4FUAu8Auy/f/zZXgIwFpAVX2YFTcJ+cjfa H53Q== X-Gm-Message-State: AAQBX9ddMrHRBBkeFFb6zKPntx2nvdCh/Ujo31F99mKD2/HZgGFUSgbE FN+pdP81Eijo1TYw9FOrIn0oGY9fqZW7Erp2PV03izDvSodrgxJ0N0lSt5aG4yig8SrR2qw+jWS 3sNguBAsZ8nUAgAq+fI8= X-Received: by 2002:a17:903:12cc:b0:19f:87b5:186d with SMTP id io12-20020a17090312cc00b0019f87b5186dmr3120471plb.9.1679845874356; Sun, 26 Mar 2023 08:51:14 -0700 (PDT) X-Google-Smtp-Source: AKy350bFKszC1l75gPvvZxm8oVIRdmx24sgTtIxxKbgDTeFtG7SBqUcEghH/HhVzgtj5Y89RP/QMl4HEvRunXP2jdsM= X-Received: by 2002:a17:903:12cc:b0:19f:87b5:186d with SMTP id io12-20020a17090312cc00b0019f87b5186dmr3120467plb.9.1679845874109; Sun, 26 Mar 2023 08:51:14 -0700 (PDT) MIME-Version: 1.0 References: <20230323144433.3104768-1-david.marchand@redhat.com> <36444f7a-78b6-0874-9f16-39328f2d2ef8@redhat.com> In-Reply-To: <36444f7a-78b6-0874-9f16-39328f2d2ef8@redhat.com> From: David Marchand Date: Sun, 26 Mar 2023 17:51:03 +0200 Message-ID: Subject: Re: [PATCH] vhost: fix deadlock with no multiqueue To: Maxime Coquelin Cc: dev@dpdk.org, chenbo.xia@intel.com, yanghliu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Mar 23, 2023 at 3:48=E2=80=AFPM Maxime Coquelin wrote: > On 3/23/23 15:44, David Marchand wrote: > > This deadlock happens when a guest, that had virtio ports with multi > > queues configured, does not announce the multi q feature in > > SET_FEATURES. > > In such a situation, all vq locks are already taken before calling > > free_vq(), which itself takes the lock. > > > > As mentioned in the code, in this situation, the virtio device is not > > running yet and no datapath thread is using the vq. So we can > > release the lock before calling free_vq(). > > > > Bugzilla ID: 1196 > > Fixes: 4b02c2673757 ("vhost: annotate async accesses") > > > > Signed-off-by: David Marchand > Reviewed-by: Maxime Coquelin Applied, thanks. --=20 David Marchand