From patchwork Fri Sep 20 13:24:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khalid Elmously X-Patchwork-Id: 1165194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46ZZDz2fMvz9sPM; Fri, 20 Sep 2019 23:24:18 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iBItR-0005ON-FL; Fri, 20 Sep 2019 13:24:13 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iBItP-0005Nv-Az for kernel-team@lists.ubuntu.com; Fri, 20 Sep 2019 13:24:11 +0000 Received: from mail-io1-f70.google.com ([209.85.166.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iBItO-0002ey-VO for kernel-team@lists.ubuntu.com; Fri, 20 Sep 2019 13:24:11 +0000 Received: by mail-io1-f70.google.com with SMTP id g8so10571480iop.19 for ; Fri, 20 Sep 2019 06:24:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DJLjx7RKrpnlxAZNv8a6nMjtXJi+iRasUNnI613fd+A=; b=sPCgeBgmasUThqLcAQv5iWYJMx2J71lEdJUENI3kjBbnfb0FiYVLQeRHOAGEQRDH6b zTBd3wzrONeSRs7YQUcFNFwm0mNBl1/pQLF7crIBwko7DpyUbKX9QfDq1v55RCSHAtok DfEwCOFFnbfgykmdWayn23AUyDzyS/e8ct4Wc1igYTrTKgdRqjv/1c8IjOn6How5lfb5 a5yATj3bHaLvxcLU+8xO/JK3TAzNshJQ6MZExlEXRGwVgQGiThEJuOAFubVu2IUTV1W5 7I3ItwKztlJC3bJWjXXkkWPEmxS1ftgmlXIdj1OyhW3uJkaRkQa3ncRenKcC95ldHS+2 eZYg== X-Gm-Message-State: APjAAAUiznl/fbc4XOsokSf5dA6GXoE84PPPUAUAgjpRzFTIWdtLcdz2 q5E20bmFOf0Hpj30EEFbdILPZ+czzNkJq2dlLFCT/m4kCCdROC6vykQvPE7vfJEVtdHlVAXQaRy RSSxMa2gJJja+XXfNSl/76C6S15+R3HJpKZJfxizR0A== X-Received: by 2002:a5e:8b43:: with SMTP id z3mr13816011iom.114.1568985849940; Fri, 20 Sep 2019 06:24:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUVAwiAzsFDrN7mXd19O7PJO9TE+L40/+W3KIqUkJ75BL8P+JkX2/FxcdQbzk1O+UcY8XJJw== X-Received: by 2002:a5e:8b43:: with SMTP id z3mr13815993iom.114.1568985849700; Fri, 20 Sep 2019 06:24:09 -0700 (PDT) Received: from kbuntu2.fuzzbuzz.org (dhcp-24-53-242-107.cable.user.start.ca. [24.53.242.107]) by smtp.gmail.com with ESMTPSA id d21sm623863iom.29.2019.09.20.06.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 06:24:09 -0700 (PDT) From: Khalid Elmously To: kernel-team@lists.ubuntu.com Subject: [SRU][B/gke-5.0, B/gcp][PATCH 2/2] virtio_net: enable napi_tx by default Date: Fri, 20 Sep 2019 09:24:02 -0400 Message-Id: <20190920132402.1006-3-khalid.elmously@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190920132402.1006-1-khalid.elmously@canonical.com> References: <20190920132402.1006-1-khalid.elmously@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Willem de Bruijn BugLink: https://bugs.launchpad.net/bugs/1834681 NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). TSQ reduces queuing ("bufferbloat") and burstiness. Previous measurements have shown significant improvement for TCP_STREAM style workloads. Such as those in commit 86a5df1495cc ("Merge branch 'virtio-net-tx-napi'"). There has been uncertainty about smaller possible regressions in latency due to increased reliance on tx interrupts. The above results did not show that, nor did I observe this when rerunning TCP_RR on Linux 5.1 this week on a pair of guests in the same rack. This may be subject to other settings, notably interrupt coalescing. In the unlikely case of regression, we have landed a credible runtime solution. Ethtool can configure it with -C tx-frames [0|1] as of commit 0c465be183c7 ("virtio_net: ethtool tx napi configuration"). NAPI tx mode has been the default in Google Container-Optimized OS (COS) for over half a year, as of release M70 in October 2018, without any negative reports. Link: https://marc.info/?l=linux-netdev&m=149305618416472 Link: https://lwn.net/Articles/507065/ Signed-off-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller (cherry picked from commit 31c03aef9bc22a64a8324d650ca4198819ef3a33) Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Khalid Elmously Acked-by: Kleber Souza Acked-by: Sultan Alsawaf Signed-off-by: Khalid Elmously --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7eb38ea9ba56..a360a528f3f7 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -39,7 +39,7 @@ static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); -static bool csum = true, gso = true, napi_tx; +static bool csum = true, gso = true, napi_tx = true; module_param(csum, bool, 0444); module_param(gso, bool, 0444); module_param(napi_tx, bool, 0644);