Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp131049rwr; Wed, 26 Apr 2023 22:01:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ThJV7KGEGrFqprXyUrPBpDmDUL8prVUIlwv51RgncWF0+CqqTyuDLGV8b++6ETGyAPmMk X-Received: by 2002:a17:90a:7a82:b0:24b:c580:1ab8 with SMTP id q2-20020a17090a7a8200b0024bc5801ab8mr550432pjf.40.1682571713620; Wed, 26 Apr 2023 22:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682571713; cv=none; d=google.com; s=arc-20160816; b=QDWBEifYRbUYN4xykMdiR3AnqNmGoXNlLAzx/8Sdc9k0iJbwvwPTV7l+wKinrYGujR 0v6QCZfQXGuw2aiFi7B5k2q2drhTuSGZutoq33KU1OHiWoLIPTMCQfTJJm8ZlPgBWFZ7 PRXfuG5qsLq2J9GV4QPKeC6PZF9i6yiJl4+1mXqnsjvB++CRPX2AeU11Nl4BxfzPglqk Lbh2GAx3l/YRMS2+c/4j5TpOl7QWcmwJNquCskhJOoXjLQnZAlf63mX4g2+6HUJomhNc XJOUIxuLzPQbeuwqTnNlzugUqquuqnG4stixybwdzCstsjuzb9o85q8FZrKIYbTk58lU 0UzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jy52NvX0OBhGC88NMda1NrOK88NbR9S0vRvwBKXzpTg=; b=n2mUyXMdbI/5yagcRZEtIUd+aSNJudKaZHZUs6avp2TwO5+68lGNcE5pQXs/WiCLcB efWE4iv0KXCgF043U95K+ZhkAIu7CQy7xWsksiWINghz4cJrkyvBCwKj1voE714bBMif nBMaIDMMR2/bdJNrsy9F/giwOkQQAHhaCHJy0/YaFhnDeRGf1OhYPhta8A9KF7q6+5ge ThqGXpOYmXd0NzVykHIksVtg8fxSJ8+NI+E1PSkXqMGRITuEh24ZHHTHvNp5cAOISyB0 /+VEvT523eJ0sKtGWKZ4Cj4+GgsE0jyKkt2H22ZSwS5pVSEpWGFDW5ljWy0Dgzx1LzfY aQ6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=hWtQxXkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob4-20020a17090b390400b0024713a8f06csi12162428pjb.1.2023.04.26.22.01.40; Wed, 26 Apr 2023 22:01:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@bytedance.com header.s=google header.b=hWtQxXkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242825AbjD0EfJ (ORCPT + 99 others); Thu, 27 Apr 2023 00:35:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234980AbjD0EfF (ORCPT ); Thu, 27 Apr 2023 00:35:05 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 315BC3585 for ; Wed, 26 Apr 2023 21:34:40 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1a69f686345so62423175ad.2 for ; Wed, 26 Apr 2023 21:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1682570079; x=1685162079; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jy52NvX0OBhGC88NMda1NrOK88NbR9S0vRvwBKXzpTg=; b=hWtQxXkdi0hyHmZTW8vTrUr4HIJ5tIYi8z1ts+5UdtA9f96et30f5RyGxlp5/jeOjz VrwiolC7A0ozBByEgT/ALdIp1cpLU0KwiWVqCKXZCg1YULHh8vC1TQ5/K5CLdVgzHrK3 ERhdHw/77lAleDwosbnHzofh/Dx/ryA22h7EIdKMSdREPrIdN7C7uA6Zap28HzxJuTx2 qPxt8hRWBEqK041JwtQeivJqHUoelUoq8JJdyl+Iz0AegGCP68SOaUDdV72mxWkuDwij I/KuLVBmuridH7QgpiO+INBabf7USC37bjpcgoNhHeSOSOR9guDzTuY9sPjs3iM3LGgE IR0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682570079; x=1685162079; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jy52NvX0OBhGC88NMda1NrOK88NbR9S0vRvwBKXzpTg=; b=CJxclKS0YcPsJTTrRKHJvENFeMpv95S0YTXdROdrgeCOVeUkF3/e2l3RLJ+enBoY0o DGKhh/qvOGgEbHaA9zfISySWHfdQ3oPMPTpjghBUwh2ZwsyW8FuKCZsxousaX4j4s3fK rTppwxtbV5jGltVU8cxSCAswC0S5lncgoHuv+GQRgruf8gxPQOl7v4Vypsi0NPgDwCmo xLC+530MDV2fvZaoKXsiZnFKLJCOeNPRP14sXtJlPcJCUw7YuGvLhTMjk4ueHhG2vaVf FTjVrx9KOViMHmV/gnOMEFMAVuW8siDaS22cuR3Sp5Xm9rEUIh6NZofdt2zucmKG5u9Z X/MA== X-Gm-Message-State: AC+VfDxyCOmteZjarszxXkaZJrjohv8FqcovPaQ05fsG00kXw2b4dyLo kjA16LMN1LxtXPH+lh5XnzGDBQ== X-Received: by 2002:a17:903:27c3:b0:1a2:3108:5cc9 with SMTP id km3-20020a17090327c300b001a231085cc9mr161224plb.40.1682570079693; Wed, 26 Apr 2023 21:34:39 -0700 (PDT) Received: from n137-048-144.byted.org ([121.30.179.80]) by smtp.gmail.com with ESMTPSA id jb14-20020a170903258e00b001a6370bb33csm10741147plb.41.2023.04.26.21.34.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 21:34:39 -0700 (PDT) From: Wenliang Wang To: mst@redhat.com, jasowang@redhat.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Wenliang Wang Subject: [PATCH] virtio_net: suppress cpu stall when free_unused_bufs Date: Thu, 27 Apr 2023 12:34:33 +0800 Message-Id: <20230427043433.2594960-1-wangwenliang.1995@bytedance.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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-kernel@vger.kernel.org For multi-queue and large rx-ring-size use case, the following error occurred when free_unused_bufs: rcu: INFO: rcu_sched self-detected stall on CPU. Signed-off-by: Wenliang Wang --- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ea1bd4bb326d..21d8382fd2c7 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3565,6 +3565,7 @@ static void free_unused_bufs(struct virtnet_info *vi) struct virtqueue *vq = vi->rq[i].vq; while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) virtnet_rq_free_unused_buf(vq, buf); + schedule(); } } -- 2.20.1