Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2295390rwd; Fri, 9 Jun 2023 09:10:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nexcgTWwADV0mdEAdXCI3sxgHkHK9BYYB8Ve7ytP8Qc44gWPtwP018rnc6hPzMb6PK/vB X-Received: by 2002:a17:903:2292:b0:1b2:466b:a600 with SMTP id b18-20020a170903229200b001b2466ba600mr1623481plh.19.1686327049902; Fri, 09 Jun 2023 09:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686327049; cv=none; d=google.com; s=arc-20160816; b=NNyYFfHEd2wvtgd5LQ1mbD71/U+zKsntHWEZUSbh3QHWNjlfyKToQbtGu9dE0HRzAc zO4jxkjDT8wWZkdkdpLf1PnbERHom3Iik4cJFrKD/05zN/pEBvC83qKkpDR3eYhOluTg vuLvYNttqX1/6x4DzLEH4+c9oQBUWcMQgeYHaZH4S1sah6W4y1R/6juibdwGuy3B39kh GjWDM2pxRIEz9WCPAzfTq2TpUVdJDjgKpOtrlEMwYSQU9g8KALVY/aOURMeE1fz56qoT uMPlYtc20x3GCHckX8p/9WRAi0JxfUCCJ3cnEYr54pBL7G+d/5D32oX1+lwo4M32B5CK blfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+y+aveIxA7jLi8Qb8e+Oc4pjTAYvwXvNOc23v+nQ9Dc=; b=pFZPuDI7L2sCWCZtW08PF9LRej+Q9RIdQqibW9yDdQ2LKyRFox1Eg//PQxo0kBASCP Oup7u1S6sR/Wmkg4AfIp/E4FzWvYm9/KjFsZtzZ6AcYyIl04Aaqqmy1oIjL6TrvC53Jg +lmoWsxGPp4V5nr5A3MY2f3f4kvdRpBYkrOBvYXVnqHLHoGk0B5cybPEWL8OsCC1Erag kd2GQDbkbnLD3WaL2AVWGYHBPxTJxZRbzNV+I3w8eUt8OPESwys4B22C0zSkE/E0s1i+ BLpPTEwwrg55LlqN6hm+eMqjZR5vVd/sUzXxHchBojLdkUbAans9Rchbm1EgTBQ6IENK OqgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NerPZvO4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903028700b001aaebc66877si2975071plr.147.2023.06.09.09.10.00; Fri, 09 Jun 2023 09:10:49 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NerPZvO4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232438AbjFIP6M (ORCPT + 99 others); Fri, 9 Jun 2023 11:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242004AbjFIP6L (ORCPT ); Fri, 9 Jun 2023 11:58:11 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E1F53588 for ; Fri, 9 Jun 2023 08:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686326243; 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: in-reply-to:in-reply-to:references:references; bh=+y+aveIxA7jLi8Qb8e+Oc4pjTAYvwXvNOc23v+nQ9Dc=; b=NerPZvO4grO/Fuju0J6ewWh5D8IyuYOWdNrgV3C2wnx7My57QcMv8zs1u0ugmDXPfA0fOY u4GjakLTV1WzLS71ycnuhR/fr63dY2Gft/UMT51Q5yw8F6/3bzRKsAg3rS9XKFb3oEbkuV YEjZPe3Yj+4jpDk2IziTVIQfyYmJSIQ= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-58-BLbJY18qMyy3J-EnJQoPvA-1; Fri, 09 Jun 2023 11:57:21 -0400 X-MC-Unique: BLbJY18qMyy3J-EnJQoPvA-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-4f624a4ea72so1406883e87.2 for ; Fri, 09 Jun 2023 08:57:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686326240; x=1688918240; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+y+aveIxA7jLi8Qb8e+Oc4pjTAYvwXvNOc23v+nQ9Dc=; b=BFTuDN3BXcEjdYuAMSDcub4pY3vsOdJm3tozOjAGJG5vkfF+9AEsYOhyzMFc0gLOjC 7XxOlIlP6pE631XQLnozrSq+d7WaAI8IOFv2aUSkh295SmsQwaKJbv79Ez61PUAXQssq WrkTrRNirG8LOng39HhBMGg5+2Mpm72ygCpf1Q3LagraH3BQWUFrn3ZhV3B+IOdxzSNC nFhyqjN5WkcOggqFmVLWxZXD5T8MzHQEimelCJJIe926XoJ7hdvt11BxbabMv2EGoGcw gPenT5W1zoeOPtrTBnIcr+ObNS3jUoCYheP/O6GSsvwd4tIm4v1v0zd6K41fdZXnk/sR 83Sg== X-Gm-Message-State: AC+VfDwHJwS5ugICUeI2KrYlQIy8WsTRxoG0ogRO/tY2vZlSi2s+E/MU qNWO86OGncwsVr6Myvxwvs0gjgHZkFyL5zfhsluO8PPJe/PovX/wH44dzqygrFn/qWZQwCHYq/6 HKR9b2WKVnfjnEM89fKaak+KMZzYX X-Received: by 2002:a19:f24f:0:b0:4f5:f736:cb9f with SMTP id d15-20020a19f24f000000b004f5f736cb9fmr989544lfk.67.1686326240279; Fri, 09 Jun 2023 08:57:20 -0700 (PDT) X-Received: by 2002:a19:f24f:0:b0:4f5:f736:cb9f with SMTP id d15-20020a19f24f000000b004f5f736cb9fmr989534lfk.67.1686326239964; Fri, 09 Jun 2023 08:57:19 -0700 (PDT) Received: from redhat.com ([2a06:c701:7403:2800:22a6:7656:500:4dab]) by smtp.gmail.com with ESMTPSA id m7-20020a7bca47000000b003f80b96097esm415596wml.31.2023.06.09.08.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 08:57:19 -0700 (PDT) Date: Fri, 9 Jun 2023 11:57:16 -0400 From: "Michael S. Tsirkin" To: Xianting Tian 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 Subject: Re: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs Message-ID: <20230609115617-mutt-send-email-mst@kernel.org> References: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> <20230609131817.712867-2-xianting.tian@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230609131817.712867-2-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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? > 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