Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2905834rwd; Fri, 9 Jun 2023 20:27:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qraSUyzhWyZEzkr3g8jE8aBi8w80fhNpUnFVh59OQgVpWWF/UcHUM9+AlcGGlQ27N4qCP X-Received: by 2002:a17:902:ea0b:b0:1b2:1f12:acf with SMTP id s11-20020a170902ea0b00b001b21f120acfmr3447437plg.6.1686367654676; Fri, 09 Jun 2023 20:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686367654; cv=none; d=google.com; s=arc-20160816; b=f7klMq74FsRXrz+lbd5HhJWAPftdngzbeNKOa4UZYpu5b5/WqfO0foIpvM8NPWQpmH naZbsaoYEZTPSiHzTHMQgb6pOLjBwWoUgoJm3PfZ3NfxBkDD4weaGI+sVONs3qBfEqpP V98yzpCnxHvvGt5uX7+yRKXOk4Z6YkEgXzF9FRxihC9jyxQPNZniKjj+Q6XGBomwokV7 wnL/jSqg1WnOqBu5/VTAZmWQONe1bEf9uMINwkMvRCUIKWKJxiohGK2guphsKve1sl3E 4KqjBQyEr6qaQ1DKanURHBRwnfJRYn4DRer3u/IYR/HTWkXgOIhxk3m6Ra2Z4AZcPNLW 3Tsg== 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=zYP5SauMYW602EyMxryqjahtO7gQtqsX93PygbF1E+g=; b=OtJbEok4p+TIWbGRSDXBjYPxVk3BLNGofQ2gSWxiGiHMdZ5/ifnx25T2okAMEufIk9 IW/FZyHElFby7DHkmaxles3YjA9HqDiInYYVgZWYlR1lBAQZoxekoqZhPrLxJv6KFDYm R6ddDOBdVWAn+S/V5tVRO+wV7gfrdNgmAgHTDgO1C9ejYeQrR1PEuV9KY/VRhv1cas2k 6puUK4TqeNryGbUhQKp/2E934LMj4/yJ9Yxt1Q815sp/22FCarD2UJfQdv7dLaD9SCie Z6d3t4iXRXinn932fsbuVfQ1u3L+SC345n5wTCKi8QsNlIdVP++NxiGMHX1RMxOIKROG 121g== 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 ij25-20020a170902ab5900b001b28738dde1si3553192plb.8.2023.06.09.20.27.21; Fri, 09 Jun 2023 20:27:34 -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 S231279AbjFJDU7 (ORCPT + 99 others); Fri, 9 Jun 2023 23:20:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjFJDU6 (ORCPT ); Fri, 9 Jun 2023 23:20:58 -0400 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B61E1; Fri, 9 Jun 2023 20:20:55 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0VkjuBza_1686367249; Received: from 30.13.188.136(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VkjuBza_1686367249) by smtp.aliyun-inc.com; Sat, 10 Jun 2023 11:20:51 +0800 Message-ID: Date: Sat, 10 Jun 2023 11:20:49 +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 1/3] virtio-crypto: 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, Xianting Tian References: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> <20230609131817.712867-2-xianting.tian@linux.alibaba.com> <20230609115617-mutt-send-email-mst@kernel.org> From: Xianting Tian In-Reply-To: <20230609115617-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/9 下午11:57, Michael S. Tsirkin 写道: > On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote: >> From: Xianting Tian >> >> Cpu stall issue may happen if device is configured with multi queues >> and large queue depth, so fix it. > What does "may happen" imply exactly? > was this observed? I didn't met such issue, this patch set just a theoretical fix. > >> Signed-off-by: Xianting Tian >> --- >> drivers/crypto/virtio/virtio_crypto_core.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c >> index 1198bd306365..94849fa3bd74 100644 >> --- a/drivers/crypto/virtio/virtio_crypto_core.c >> +++ b/drivers/crypto/virtio/virtio_crypto_core.c >> @@ -480,6 +480,7 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto) >> kfree(vc_req->req_data); >> kfree(vc_req->sgs); >> } >> + cond_resched(); >> } >> } >> >> -- >> 2.17.1