Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1891922imm; Tue, 22 May 2018 11:00:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpqbmD3XirBo/XTdL+4a+//W6r38SM5deNRWnMoBt1Ny86StUhBOpDFBjvfYB0BvNYHapzJ X-Received: by 2002:a63:a807:: with SMTP id o7-v6mr5144103pgf.83.1527012046949; Tue, 22 May 2018 11:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527012046; cv=none; d=google.com; s=arc-20160816; b=vWQN2F1ptx37hqs9PgB6QxvvonfdbJI9mTluWfIqGLY7rp4Bua9zpbigBeq87+vFLc LPCa5vXomPWgA3vcCfoPkBGpqQee5MGkk4NcVPz9Vozf1sw13m4OAIvPxhoVlUMggwsN KHDafeixtr30OxZkBNdBh8Ca4RRsZSCve5qiWKIwxNWc/TdWsc5xfNRgHzTJYh0fEyGe lBHlo+RRYSSWKa2bWRzqgPOWHxFAMDeviSroBDG5AN0M6/25oTGjmMJPI+tk+bci37t9 a1iKwArbEm03xfO+8azvGM5tCyaW30jTNSZTMVQz6WUWCjRuxBh+AgXyTpSmWT9p0Vl+ 1XoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:date:message-id:subject :mime-version:content-transfer-encoding:from:dkim-signature :arc-authentication-results; bh=TD6DCDIF/Zz3AdG5SYM4RkaFBH6DCs8hGUnVToG5L8M=; b=EYDSxaddQmzLox8ED9CreeO62gexPSeDTpQA3hmCBhL7grKOR6wjB8on00Qtim8lEJ S1cP/FzcqRcN98jjs2b17BPez1XzN6gQP7U8Dc9lG2EH8uVP352VJjr+YmvlVszjNzaD AmsI0zBaRBfOIsxtqkwdZEFkNADJNdHOcywTgkPsW1n0SecjbOiTEv8RZZ7stCRwLtKf +TU+xxQYeTGZqlad1L47Xr2SMy+BfM5OcE1PCLQCjt+mhB5ubFaZkZeyjrvR75xh+iu9 RhniX1RUgOb6JEFvreU8rF5Up6MRmCY6hJlhPHL0D2wwvTcuXR4hVWEuEMWg3A4BtU3j WTPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=puNc3YAj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5-v6si17325245ply.598.2018.05.22.11.00.32; Tue, 22 May 2018 11:00:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=puNc3YAj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751561AbeEVSAQ (ORCPT + 99 others); Tue, 22 May 2018 14:00:16 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:52622 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeEVSAP (ORCPT ); Tue, 22 May 2018 14:00:15 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4MHox4e028425; Tue, 22 May 2018 18:00:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : content-type : content-transfer-encoding : mime-version : subject : message-id : date : cc : to; s=corp-2017-10-26; bh=TD6DCDIF/Zz3AdG5SYM4RkaFBH6DCs8hGUnVToG5L8M=; b=puNc3YAjpmw0cnJsZ1hwwqLmEFR29iDjcsTddtalgMJzsgJ+chJ5dv4J2uWiTedbgb9H lMUOLpFFOZkngmCViGHphFVHtarqwIWHvaemqPs22wGR4Wdp9g+jQ8wWolYn0MOSpbjX 7NrKEkw7/3gcHEErdWuzMbDi7SE/M39BdsIJACJ57603eXVG/0WduL3gG7cRuBpagaaH HChkjJ/Jqym7kOnBLACil1X/gIKnsG/FBdSprDdbSV5KcVzIyjQyv+aQ93vH1UW97jPD YZVoOx5eJ6ue4bwlbt4xQk/zKTL47CYFbMXShcYtUKRjnmNPzFxY7uziOxZ29bxxaGsz ew== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2j4nh7guyk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 May 2018 18:00:12 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4MI0BnL032015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 May 2018 18:00:11 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4MI0B7c026129; Tue, 22 May 2018 18:00:11 GMT Received: from dhcp-10-154-165-23.vpn.oracle.com (/10.154.165.23) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 22 May 2018 11:00:10 -0700 From: William Kucharski Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Regression: Approximate 34% performance hit in receive throughput over ixgbe seen due to build_skb patch Message-Id: Date: Tue, 22 May 2018 12:00:09 -0600 Cc: alexander.h.duyck@intel.com To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Jeff Kirsher X-Mailer: Apple Mail (2.3445.8.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8901 signatures=668700 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=821 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805220192 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A performance hit of approximately 34% in receive numbers for some = packet sizes is seen when testing traffic over ixgbe links using the network test = netperf. Starting with the top of tree commit = 7addb3e4ad3db6a95a953c59884921b5883dcdec, a git bisect narrowed the issue down to: commit 6f429223b31c550b835b4f066ac034d0cf0cc71e ixgbe: Add support for build_skb This patch adds build_skb support to the Rx path. There are several advantages to this change. 1. It avoids the memcpy and skb->head allocation for small packets = which improves performance by about 5% in my tests. 2. It avoids the memcpy, skb->head allocation, and eth_get_headlen for larger packets improving performance by about 10% in my = tests. 3. For VXLAN packets it allows the full header to be in skb->data = which improves the performance by as much as 30% in some of my tests. Netperf was sourced from: https://hewlettpackard.github.io/netperf/ Two machines were directly connected via ixgbe links. The process "netserver" was started on 10.196.11.8, and running this = test: # netperf -l 60 -H 10.196.11.8 -i 10,2 -I 99,10 -t UDP_STREAM -- -m 64 = -s 32768 -S 32768 showed that on machines without the patch, we typically see performance like: Socket Message Elapsed Messages Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 65536 64 60.00 35435847 0 302.38 <-- SEND 65536 60.00 35391087 302.00 <-- RECEIVE or Socket Message Elapsed Messages =20 Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 65536 64 60.00 33708816 0 287.65 65536 60.00 33706010 287.62 However, on machines with the patch, receive performance is seen to fall = by an average of 34%, e.g.: Socket Message Elapsed Messages Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 65536 64 60.00 35179881 0 300.20 65536 60.00 21418471 182.77 or Socket Message Elapsed Messages =20 Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 65536 64 60.00 36937716 0 315.20 65536 60.00 16838656 143.69 William Kucharski william.kucharski@oracle.com