Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp183828imu; Thu, 6 Dec 2018 22:25:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/XxNG8OItx4vrY7QJ1GR87SvYoybvpR1haLANSGyEOtc6OgezUTRQkQZzNtzJ+jbAufaTZ0 X-Received: by 2002:a17:902:f091:: with SMTP id go17mr987950plb.235.1544163906117; Thu, 06 Dec 2018 22:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544163906; cv=none; d=google.com; s=arc-20160816; b=1CDiuNYpKEj/Zx7m+rLDD/aSfqbFtruqdT0wwEW/yMw8DU6GY3BPhcqeAkCFHomGdH Gf5aeeJxQTgHehywfQIPYikaFbLirJPwkLwnWxZ5vAWy4GTvHACbuWaI7sphJ0oJh4aj pR5ok3qkZ8TU4DfOab/kXyJejqQ8filL9n/1AO0uCaSzXRSFslazOd4HlkUptCQpoBrr CtMRQefpgXMqcKeLcaJZpGTAgZy4IIboXm7dr95sdDtVjbwr0vHEqq2cq6CGIrQma3cd 32ii4wAyqO1Yvc+cdSyUGmadK6uvTtqW8CfD79XWm1bVskKzhTH5Hs9MQXUzmC6FAaJV HdHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Uno178v/MD9BXhUIO8kVnX7iAz/0PJNhoKYDzzMXt8g=; b=k21q2gXhfQf7OMAXewK+zf4ru2gS4E9CK7htQb5jGBeDkQgFmFvs5Tfjtcp2M2KmoE x4CdnYyikFmW4GwIftAAR5BFUObtpNx3Gk6LZlSrg//V406pjXtPA2imT7W7vdGNjFWi MNj5dxZolTdzuLRav2VJJEIRA4Ej3ormCdLz43bOllOa9v81GJebRocE9h5+xuCFLFBU Rb3RdH0Alab++RFWgVcl0PGGTjsmxH/U9oX2yHfUNjHhlxzPDsy/Gxkz1Jfdk6WdIO6Z xgySbFaRov6CU5dvliFTz3sQTdaxYkg1Wd2Su/JhA9DryuIA/JK1hyWZkxmLRPK4xHCR iLEA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si2113070pgj.442.2018.12.06.22.24.50; Thu, 06 Dec 2018 22:25:06 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726019AbeLGGYN (ORCPT + 99 others); Fri, 7 Dec 2018 01:24:13 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:49778 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbeLGGYN (ORCPT ); Fri, 7 Dec 2018 01:24:13 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 269CD147E6BB3; Thu, 6 Dec 2018 22:24:12 -0800 (PST) Date: Thu, 06 Dec 2018 22:24:09 -0800 (PST) Message-Id: <20181206.222409.551374562843523036.davem@davemloft.net> To: pabeni@redhat.com Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, pjt@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 0/4] net: mitigate retpoline overhead From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 06 Dec 2018 22:24:12 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Abeni Date: Wed, 5 Dec 2018 19:13:38 +0100 > The spectre v2 counter-measures, aka retpolines, are a source of measurable > overhead[1]. We can partially address that when the function pointer refers to > a builtin symbol resorting to a list of tests vs well-known builtin function and > direct calls. > > Experimental results show that replacing a single indirect call via > retpoline with several branches and a direct call gives performance gains > even when multiple branches are added - 5 or more, as reported in [2]. > > This may lead to some uglification around the indirect calls. In netconf 2018 > Eric Dumazet described a technique to hide the most relevant part of the needed > boilerplate with some macro help. > > This series is a [re-]implementation of such idea, exposing the introduced > helpers in a new header file. They are later leveraged to avoid the indirect > call overhead in the GRO path, when possible. > > Overall this gives > 10% performance improvement for UDP GRO benchmark and > smaller but measurable for TCP syn flood. > > The added infra can be used in follow-up patches to cope with retpoline overhead > in other points of the networking stack (e.g. at the qdisc layer) and possibly > even in other subsystems. ... Series applied, thanks!