Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2080326rwd; Fri, 9 Jun 2023 06:29:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5U8t6mbY23Wv8oHP34bMJEAozz/taQuHYps0fIf1U9RkmiaH9ehv0S9ZORsZ3r1BZuDk5h X-Received: by 2002:a05:6a20:7da6:b0:10c:d5dd:c223 with SMTP id v38-20020a056a207da600b0010cd5ddc223mr1978005pzj.15.1686317356757; Fri, 09 Jun 2023 06:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686317356; cv=none; d=google.com; s=arc-20160816; b=UcrLocgzRvQTAnfeuYSzbv9jmet6fwXiFegKSOlvUEWdtQxyvfZDIDnJElbhTMXgAp WOFCMksqeJPEIOsResruyDUu4kwcHX36bGnY1xWk5FbiikRjSrLYCIkc+7nOqfI+4DFE 6bP4yA1ARHFXk8UHtj6J1LZfmILj7sEtAa8HZ7XCsmZhQCD9wzr0w1qZMNudMhOgvUTL 5CWp5GsfH66M0Y3bBYDIAkmk3zv0Kgw8Na9kVD1YpzQ8Zh9/zRMkCnaxb0RLWRn4vy8O mYMpg8YgI2CPM+5owD7azQ2uvUEBV+BrsGaniMb9eH9imfzwXCbHZeAftorR+gkG4ggb 9xGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=ZFQwMvPG54TXb0bpZ/QXRxZNX/o+H6sy6b20Ot3fMJM=; b=H+q8HVli49BCD5VoumEcIeQeq12xNFjFKmGtzjpXH0N+vdKBYQgiP8Qa5KanfCpMyQ fW0Of42iMwfdMDIID+MzHYdRAvVW/h3N43S/tpEKkjS7rHv8IilIgQXM4YLxIM5gqrcd m+Onm7BV8XZ9tgAQi7DiGut4A+oOXzoyxKxnrE2j38VQIZjOKdJBSTUszjdgv3T8MDP9 x8ySJoXrifyU9Ap0ifJ7Q5WgZFycrllk1vD/H5OBKl754hsAgg2Q7QFGju3WRv3ZEwVy 4Z1EjTcsiG0ZmavJqukv6ku0DP7wBDxuiqblC5iXiDcM37Xc2Jvyfx9bVO8/go6R1hhn 9PwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 e128-20020a636986000000b00543d2b889e0si2679531pgc.469.2023.06.09.06.28.57; Fri, 09 Jun 2023 06:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S231135AbjFINSs (ORCPT + 99 others); Fri, 9 Jun 2023 09:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240335AbjFINSk (ORCPT ); Fri, 9 Jun 2023 09:18:40 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A513596; Fri, 9 Jun 2023 06:18:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VkiFAAr_1686316709; Received: from localhost.localdomain(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VkiFAAr_1686316709) by smtp.aliyun-inc.com; Fri, 09 Jun 2023 21:18:29 +0800 From: Xianting Tian To: arei.gonglei@huawei.com, mst@redhat.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 Cc: linux-bluetooth@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Xianting Tian , Xianting Tian Subject: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs Date: Fri, 9 Jun 2023 21:18:15 +0800 Message-Id: <20230609131817.712867-2-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> References: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,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-bluetooth@vger.kernel.org From: Xianting Tian Cpu stall issue may happen if device is configured with multi queues and large queue depth, so fix it. 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