From patchwork Thu Sep 19 09:23:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khalid Elmously X-Patchwork-Id: 1164491 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 46Yryb3yrYz9sP7; Thu, 19 Sep 2019 19:24:23 +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 1iAsfi-0004lq-T4; Thu, 19 Sep 2019 09:24:18 +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 1iAsfX-0004du-Gb for kernel-team@lists.ubuntu.com; Thu, 19 Sep 2019 09:24:07 +0000 Received: from mail-io1-f72.google.com ([209.85.166.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iAsfW-0001FR-Pl for kernel-team@lists.ubuntu.com; Thu, 19 Sep 2019 09:24:06 +0000 Received: by mail-io1-f72.google.com with SMTP id o6so4262086ioh.10 for ; Thu, 19 Sep 2019 02:24:06 -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:subject:date:message-id:in-reply-to :references; bh=cGad4kINwXblWUVRoAgQqwrkN58bV3dF+/RR6ryAyX8=; b=HXwRKwE9JYXcVZeyGjHpvHuhcRVG/AGwDuw82MR/ih+ub8/+x6hsSkrSxDAhUFfFna Y5ezF/dKgGeQROLUMDQKQUcjgKNFcqKMoIJ04NxjpZShHguE3LoUdgHuzRR5FQFFJpZm 4TUo1miooaR91egHGR+ZqQ4lJIfzNU/vyBq5RYxeMnpks8zP/gSn3HMBck8YH2P7rxR5 JF1ZIS7r/N0n9//lEZUW5tYOSI+Av9+QcjFckUgPZWxbHOIJysEO+6xEhFcV2JL9tBab 7zVElEMlOOVWZzQZPv8F/boZaUFbiygA0KPVZHsjcOvAxx2JEAYIeN5uvyk8lkK3uq1t xkCg== X-Gm-Message-State: APjAAAWNcGmqj7+wsYgEoQwJDyDspGoAwxVCnVs0MD/UURNUj/72mfdT IHnYCz4VDclI9qyVRCT5VPlfGuuPwNIwJRU/Tb5skf9k6le6yShz6TiSuzdT/dsDedbBksPmljJ srU27DTAjexTN9s2MFW3tzy2ipZ2IMAOdnlZjMlRPmA== X-Received: by 2002:a05:6638:928:: with SMTP id 8mr10366096jak.124.1568885045630; Thu, 19 Sep 2019 02:24:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/TxU6VroCap7CZKrceN4fO594neMRuBG6Lv5CAisqH3IXW4Gue7qnQaSl/jEliqcfaPyjYw== X-Received: by 2002:a05:6638:928:: with SMTP id 8mr10366083jak.124.1568885045425; Thu, 19 Sep 2019 02:24:05 -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 d9sm798937ioq.9.2019.09.19.02.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 02:24:05 -0700 (PDT) From: Khalid Elmously To: kernel-team@lists.ubuntu.com Subject: [SRU][Xenial/gcp][PATCH 10/11] virtio_net: enable napi_tx by default Date: Thu, 19 Sep 2019 05:23:52 -0400 Message-Id: <20190919092353.29993-11-khalid.elmously@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190919092353.29993-1-khalid.elmously@canonical.com> References: <20190919092353.29993-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/1810457 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 linux-next) Signed-off-by: Marcelo Henrique Cerri 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 82782d3a2b41..8735dbca54b5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -36,7 +36,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);