Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp525565imu; Mon, 26 Nov 2018 14:25:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WygVF/5TsnjXrRMGqAWLdSFQavldRM3jALQCcxp2oE8PpoNT9HfaueAWKX+HG9q14JqLIl X-Received: by 2002:a17:902:50e3:: with SMTP id c32mr29946258plj.318.1543271118038; Mon, 26 Nov 2018 14:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271118; cv=none; d=google.com; s=arc-20160816; b=tixWXnqoL0jGpcheuxV1bN+B8YSAfhF/8DHSn+VaFPznqM5zRsfiB32TcNJ8HXbCYF rU5YguYyBvm2qmPi4NPoT6ppOQElou9y9ru/CMVGvSdYJPMli61wxMOQOM1y4L/5DNK6 73KcleKuJgQu0kZnv07lAtiMox+jLP7HLDkgXziu6KpyO03nkCVORyDLLxODZhKZ6eao gCVm2q/f68ov1RNpEjWpngmwBxit3sB0YRDlxaDPjpOc9HK2vmo0oHgqlBjnWurCf2nm QJyfQ1TQuY/WbtAIyUc6uIEbTrAVfxX22lEOzyLx5tkXA3VP6udpm1xjBes6vJgR3Wzu S9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6E+Nr/Ow/IsKUJJTL0fUpEMb6j5zGlwZIiCnpw8ZOsM=; b=myBkNn7YmVSLAsX3teVHyusvOhOa36KeFzgjdXFk0mgO6iwoPt1oSzriEpv/nBshc0 SoxF5iVR2jntANvpaV6v2cIvhNxcIdIrg7pDF5xQpyH5ekd+hN27QNqsJ5CQ97ORhUx2 Kz4UfZYHZ9EmYKd9O/OzGYiWtrruCDGnxS07ffdxr+te7z1woNnZsEElM6i06EHHNBoF l37OfvzVa5b7LEYpcH27Bz1X07WgjA7uIQ4WHghzmmbIsDEQNKBPsEkUoI1wSliQSRrJ 0HAg6I5reOQqYtXLyjG3ZwARJFRKaa7PSOdUBNQ5fgxVUK8vh+asXryx1xZ/fdaqfQqO H5rA== 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 a35si1604356pla.226.2018.11.26.14.25.01; Mon, 26 Nov 2018 14:25:17 -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 S1727262AbeK0JUC (ORCPT + 99 others); Tue, 27 Nov 2018 04:20:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbeK0JUC (ORCPT ); Tue, 27 Nov 2018 04:20:02 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FD2334CC; Mon, 26 Nov 2018 22:24:25 +0000 (UTC) Received: from treble (ovpn-121-105.rdu2.redhat.com [10.10.121.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38FAA5C6DC; Mon, 26 Nov 2018 22:24:22 +0000 (UTC) Date: Mon, 26 Nov 2018 16:24:20 -0600 From: Josh Poimboeuf To: Steven Rostedt Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Linus Torvalds , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , Julia Cartwright , Jessica Yu , "H. Peter Anvin" Subject: Re: [PATCH v2 0/4] Static calls Message-ID: <20181126222420.7w2vxux7mtnfxu5r@treble> References: <20181126155405.72b4f718@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181126155405.72b4f718@gandalf.local.home> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 26 Nov 2018 22:24:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 03:54:05PM -0500, Steven Rostedt wrote: > In summary, we had this: > > No RETPOLINES: > 1.4503 +- 0.0148 seconds time elapsed ( +- 1.02% ) > > baseline RETPOLINES: > 1.5120 +- 0.0133 seconds time elapsed ( +- 0.88% ) > > Added direct calls for trace_events: > 1.5239 +- 0.0139 seconds time elapsed ( +- 0.91% ) > > With static calls: > 1.5282 +- 0.0135 seconds time elapsed ( +- 0.88% ) > > With static call trampolines: > 1.48328 +- 0.00515 seconds time elapsed ( +- 0.35% ) > > Full static calls: > 1.47364 +- 0.00706 seconds time elapsed ( +- 0.48% ) > > > Adding Retpolines caused a 1.5120 / 1.4503 = 1.0425 ( 4.25% ) slowdown > > Trampolines made it into 1.48328 / 1.4503 = 1.0227 ( 2.27% ) slowdown > > With full static calls 1.47364 / 1.4503 = 1.0160 ( 1.6% ) slowdown > > Going from 4.25 to 1.6 isn't bad, and I think this is very much worth > the effort. I did not expect it to go to 0% as there's a lot of other > places that retpolines cause issues, but this shows that it does help > the tracing code. > > I originally did the tests with the development config, which has a > bunch of debugging options enabled (hackbench usually takes over 9 > seconds, not the 1.5 that was done here), and the slowdown was closer > to 9% with retpolines. If people want me to do this with that, or I can > send them the config. Or better yet, the code is here, just use your > own configs. Thanks a lot for running these. This looks like a nice speedup. Also a nice reduction in the standard deviation. Should I add your tracepoint patch to the next version of my patches? -- Josh