Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp202887imw; Mon, 4 Jul 2022 07:44:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uvL6oUaU32gaSULqprldY0kqAwZxzUEHPJX2KOP1b1Dc2qZZ3KTYYj/gq0MXRR/3mzWH8P X-Received: by 2002:a50:eb45:0:b0:437:7686:6048 with SMTP id z5-20020a50eb45000000b0043776866048mr40851292edp.264.1656945884634; Mon, 04 Jul 2022 07:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656945884; cv=none; d=google.com; s=arc-20160816; b=HoXwXTYof6PGy3EUx8Uzpl8WoRloeVsrikRYs9DiJF1NYVeWzR9VC+ca2Hqfm2/hVL kyTHqW9AqhAVCcgtypYPusGUcjvYSWCjpXqd/UU8eN0sn3uzZBWxIATGUFQQjNy2YAD6 1PgqH3N8LNvyqzqvlyw63+19MtcqYBWhpg6Yya8ReESNrUCnjBIi7TfTzs+U9Af068Nb NzQMnFOGejp/BFhmA1cxUkkBoFiL0jO5VWEH1qDt9RRw+BAlhaSplmqbOjkEGh4seoqf E5aNQLP0ObiKI/opb4+LOK03GFJoCwyE/9pOG3ymDnxEgJ2x0BYSGhVfFs6chMMfUvE2 C/jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=piYqBJeFz7D47ap3/7x8Zet4UDXF1mtxAPCnP4s0dzE=; b=hdliMzI5U1Gsj98cyBzKRR8MxtJlydUoiaguFZ3Zwy8UjxIFLoVmCpLWjaWBNMLo1M Hp1HoRdEtiDoG+GqW9aR9Jz7u7UmUgSl8OlLGz3nczYOuM84tD+RllhOVMlaATmcNu08 Bg9pAMgB6d+1tzBO9Y7880CSZPFz0WrFdOhxayGlurfFDWY0/DYqkYbHNOYiUSDi5+XN SmdQ5BB0qM/Mp89xMEKDh8xvVcEgGmwjBLUBWiqeGlV7nv8uFYXg8YaOPrdsAlKqSjI4 CJHxToeAGwXJ5MCN3x1APEr2R0jyY1z9EpmA1TXpmatGpPZkSOf4+qrhG3U3ELMI6onr w9pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=GFDrlTan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb28-20020a170907961c00b007269af5c7f8si16253939ejc.853.2022.07.04.07.44.18; Mon, 04 Jul 2022 07:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=GFDrlTan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233370AbiGDOCD (ORCPT + 99 others); Mon, 4 Jul 2022 10:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233557AbiGDOB6 (ORCPT ); Mon, 4 Jul 2022 10:01:58 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75F4FCE2B; Mon, 4 Jul 2022 07:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=piYqBJeFz7D47ap3/7x8Zet4UDXF1mtxAPCnP4s0dzE=; b=GFDrlTaniO6lVyB2FKMvwa+SVf jJ2V9XKZikOZ2YZsn3ZEbSIdq5cxpOfEFF16XlM8t9RImmj5r6dZiu/cJjLtenOaqLWGahIZxOlsY YTFMfgE6avgD+O7TCQt/FEe5nTgRj3z+EMr3ZcmHygQhZVBsEMKzIzS0OhRTva8WoSusU1l0Bq1xb onsQAO+Z8sLNHG24ay/3aYI/5y8lymwSor915ccm7RukhyYdSGzDxMq7qK/crSIHRjrMie4cHiGel M1qqFpyMumUP0YmQKHg+mfEr95KpQ5fTo7UD4pXrT1x4UvN07pQA5x5WUqqRnRtcIRQmtxu2WxFCz fpQuM6RQ==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8MdW-00H9PD-J5; Mon, 04 Jul 2022 14:01:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 60ADB980057; Mon, 4 Jul 2022 16:01:15 +0200 (CEST) Date: Mon, 4 Jul 2022 16:01:15 +0200 From: Peter Zijlstra To: Bill Wendling Cc: "Jose E. Marchesi" , Ruud van der Pas , Nick Desaulniers , Sami Tolvanen , Vladimir Mezentsev , clang-built-linux , LKML , Yonghong Song , Wenlei He , Hongtao Yu , Ingo Molnar , linux-toolchains , elena.zannoni@oracle.com Subject: Re: plumbers session on profiling? Message-ID: References: <87mtf7z0rt.fsf@gnu.org> <6F9E9D93-3913-4022-9384-D809C8EF7715@oracle.com> <878rpgpvfj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2022 at 11:57:25AM -0700, Bill Wendling wrote: > On Fri, Jul 1, 2022 at 4:49 AM Peter Zijlstra wrote: > > IIRC Google has LBR sample driven PGO somewhere as well. ISTR that being > > the whole motivation for that gruesome Zen3 BRS hack. > > > > Google got me this: https://research.google.com/pubs/archive/45290.pdf > > > Right. However, there's a chicken-and-egg issue with AutoFDO for the > production kernel. We can't release a kernel that hasn't been compiled > with PGO/FDO. We could only release it in a test environment, in which > case we could use AutoFDO. However, the document says that AutoFDO > only reaches ~90% of FDO. They list some reasons for this, but > nonetheless I suspect that the delta would be too severe for us to > release the kernel. The pertinent question seems to be what's missing? Where does that 10% go. > As for LBR, that will work with Intel/AMD, but I thought that LBR > doesn't exist for Arm processors (my knowledge could be out of date on > this). Not totally up to date on the ARM thing either; but I believe you're right in that they don't yet have such a feature. > What would make PGO (sample-based or instrumented) easy enough for you > to use? What're the key elements missing? The key piece missing is how to feed a perf.data file back into the compile cycle, something like: $ make O=build/ PERF=perf.data -j$lots would be useful I suppose.