Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1887355imu; Sun, 16 Dec 2018 11:05:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/UTSOwDC61Cc++ke4LNdTK+Jf0ApCWUXLAIUc89wCgBLa+VBa2Qa71StnxyQ8R5TI1u9f9r X-Received: by 2002:a63:cf48:: with SMTP id b8mr9839270pgj.17.1544987114521; Sun, 16 Dec 2018 11:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544987114; cv=none; d=google.com; s=arc-20160816; b=0p5qHB7zdf1Bho4MaqT28uoY86jmNbR9KrZKiJAFmL0/tqCzMaEEnpiJw/pyU/wEZK /mtSzwhDMHLkOpnm9BYQK7e++1glsB14fRg+mdH+/0NFdkAYTcjZO1yOx1+kyuH/Dsm4 C1wnJTJuhuVpx5dH4p4jpLpitV3z0vsTYSgViVbwrP7fT6NLOaUWLNM7zLUEtlPBA+L+ xiDnWuOagGcUOkzyGE6Q8zlBIiECuulxccJQnbkBZoWHUhEg/mfybd6MVHkh44l0n6PR ywdmNZVPHwSSrzhIP9E8j+8Hppcvzi4BpaHtJtYy+tEHKCxI8gkq/mcgS5e/4KpyklJR Erdw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=RkzddjzDFKmaG/0IzLbO+4Rr2PsLC7RYreXjkWaJHAM=; b=Fs6KhsnVQ2i/trvMIop/a/x0e6viaL9ywGoj95k/Tenurfv+9/VcDGx2+4MWBMbpO2 j7N4YZVMiov5oYS4FTyeXEa2Svxn6xjbiKH+y9TrAIEMIef06xkM3bx8OkWdErnwccdl sRmycFdp7WYQJh45oMCWJOSdN2M65focs5mJPAdO/DRZ8uFXXkiKw76w0tDz8QsCKH1b Eshf7XuuziT/CERbiSIS/YTeP00yodWSfY0ORBofn/bU34gpgFG+4DK3eK+CqpWmEanZ wbq4wpjWaLxR83+lo6fyoM9J7rF6ntfoaxcl3szj7xsvvV3oDHTgHjqg4wfK5fIenfM/ nrtw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si9163323pli.175.2018.12.16.11.04.56; Sun, 16 Dec 2018 11:05:14 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730823AbeLPSzo (ORCPT + 99 others); Sun, 16 Dec 2018 13:55:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38752 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730593AbeLPSzn (ORCPT ); Sun, 16 Dec 2018 13:55:43 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B8F4E3E19; Sun, 16 Dec 2018 18:55:43 +0000 (UTC) Received: from ovpn-116-87.ams2.redhat.com (ovpn-116-87.ams2.redhat.com [10.36.116.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6611B1055006; Sun, 16 Dec 2018 18:55:41 +0000 (UTC) Message-ID: <2444a44091ae292166c6cad1e31fd85ed2b77fe7.camel@redhat.com> Subject: Re: [PATCH net-next v3 0/4] net: mitigate retpoline overhead From: Paolo Abeni To: David Miller Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, pjt@google.com, linux-kernel@vger.kernel.org, ecree@solarflare.com, dwmw2@infradead.org Date: Sun, 16 Dec 2018 19:55:40 +0100 In-Reply-To: <20181215.132333.867660599141318055.davem@davemloft.net> References: <20181215.132333.867660599141318055.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3 (3.30.3-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 16 Dec 2018 18:55:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2018-12-15 at 13:23 -0800, David Miller wrote: > From: Paolo Abeni > Date: Fri, 14 Dec 2018 11:51:56 +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, I'll push this out after a build check completes. Again, I messed it! I'm really sorry to waste everybody's time. I was unable to give proper coverage with different configs. I tested vs.: CONFIG_IPV6=ymn CONFIG_INET=yn but # CONFIG_RETPOLINE is not set fooled me. The following patch should fix. I'll try more configurations. Is there any way to try/tests all kbuild robot configs? Please feel free to give me an hard stop if this sounds too much a trial and error thing. Paolo -- diff --git a/include/linux/indirect_call_wrapper.h b/include/linux/indirect_call_wrapper.h index 7c8b7f4..00d7e8e9 100644 --- a/include/linux/indirect_call_wrapper.h +++ b/include/linux/indirect_call_wrapper.h @@ -28,8 +28,8 @@ #define INDIRECT_CALLABLE_SCOPE #else -#define INDIRECT_CALL_1(f, name, ...) f(__VA_ARGS__) -#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__) +#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__) +#define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__) #define INDIRECT_CALLABLE_DECLARE(f) #define INDIRECT_CALLABLE_SCOPE static #endif