Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2904507rwd; Fri, 9 Jun 2023 20:25:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zj3pJrTlH8k+Hos8L/sQGO6wHkSaMuu26MTHnLM6cdGHA/DVxv9cCocGksEH2R+/+Ezwy X-Received: by 2002:a17:90b:4c84:b0:252:b150:6ce with SMTP id my4-20020a17090b4c8400b00252b15006cemr4037072pjb.1.1686367525887; Fri, 09 Jun 2023 20:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686367525; cv=none; d=google.com; s=arc-20160816; b=fqLwmL/TDCB/QM48N6UEYTTg/OocXyL/CxarqF2C5ZEM+1w+K1IuhnTqEaIOWvSbSf vWjSfF3w7SNt762ztq8eW+5U4Xo6mKPJlZ0onsgUJmmGsSd8Ufem13tt7DW7AsoxgByw k03SLW4aX2dX6yw/XLyUF+7Fu6wzpzqVXEzL5TRevc0+3iTYqWF7sZBC+vtMI4PT6hsQ MVdcfY3OnMhRFiAQVjQxGCMoWzSFcbstvsgh/GqHhhKWN7pGHVx6O3b7lgE9wG93cpfz Xf/kHXt0DNzCiBaff7cbir2Iva/4sbFr7AvDcIejO5J8ia92v0KYarqE2YjDCu8qZ8tX DQ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=J/iOZadg9kSmM7Rc2A8AuG7dP78pI5um+VHrSBCDp6c=; b=SZSI334N5wn5b8QdFfB+1zQBKyTuWjap8zWHUyBWA97yMIC80umUMLeSEJiCsJs4SZ feIeWQcDETWzEvsbNJEs4O8aimm17HrVBJZeVkdpWi3iKFBS4d4fpmDLhcc97G00aWvv lXiK/+aeEFigOHz7cHmhuxbwStY5BsdeUxuLkJgVuXa8EfskKj9h/43fEdiKfFf8GME4 6mAI0wRhc3crY7kPfOsTnlvhzFPILIBsBrdfrRqD5PERHGOWSTKRI13LepYoIcXvtwGd SEkumO6Uj80iTz6gvh53OlAB5oZufVMVhHAo56qDEYWxU2zLpG88PETjNJmAtJFTOxAP ZWyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl9-20020a17090b384900b0024e140702efsi5498876pjb.118.2023.06.09.20.25.12; Fri, 09 Jun 2023 20:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbjFJDTM (ORCPT + 99 others); Fri, 9 Jun 2023 23:19:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbjFJDTL (ORCPT ); Fri, 9 Jun 2023 23:19:11 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55548E1; Fri, 9 Jun 2023 20:19:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VkjxUgb_1686367143; Received: from 30.13.188.136(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VkjxUgb_1686367143) by smtp.aliyun-inc.com; Sat, 10 Jun 2023 11:19:05 +0800 Message-ID: <5149dde8-b6b2-e720-2e32-5c79684a99db@linux.alibaba.com> Date: Sat, 10 Jun 2023 11:19:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 2/3] virtio_console: fixup potential cpu stall when free unused bufs To: "Michael S. Tsirkin" Cc: arei.gonglei@huawei.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com, herbert@gondor.apana.org.au, davem@davemloft.net, amit@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> <20230609131817.712867-3-xianting.tian@linux.alibaba.com> <20230609120332-mutt-send-email-mst@kernel.org> From: Xianting Tian In-Reply-To: <20230609120332-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 在 2023/6/10 上午12:05, Michael S. Tsirkin 写道: > On Fri, Jun 09, 2023 at 09:18:16PM +0800, Xianting Tian wrote: >> Cpu stall issue may happen if device is configured with multi queues >> and large queue depth, so fix it. > "may happen" is ambigous. > > So is this: "for virtio-net we were getting > stall on CPU was observed message, this driver is similar > so theoretically the same logic applies" It is this one  “this driver is similar so theoretically the same logic applies” > > or is this > > "the following error occured: ....." > > ? > > >> Signed-off-by: Xianting Tian >> --- >> drivers/char/virtio_console.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c >> index b65c809a4e97..5ec4cf4ea919 100644 >> --- a/drivers/char/virtio_console.c >> +++ b/drivers/char/virtio_console.c >> @@ -1935,6 +1935,7 @@ static void remove_vqs(struct ports_device *portdev) >> flush_bufs(vq, true); >> while ((buf = virtqueue_detach_unused_buf(vq))) >> free_buf(buf, true); >> + cond_resched(); >> } >> portdev->vdev->config->del_vqs(portdev->vdev); >> kfree(portdev->in_vqs); >> -- >> 2.17.1