Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1514973pxv; Fri, 2 Jul 2021 05:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuLjZpZUEFCRAKVxeuto2TZO3Oz148wMyYXWxZgUt4EFcrq5mPCdAJ28JK9M47mPiYWIFJ X-Received: by 2002:a05:6402:148d:: with SMTP id e13mr6510572edv.28.1625230140900; Fri, 02 Jul 2021 05:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625230140; cv=none; d=google.com; s=arc-20160816; b=us1yiHg5neJE55VXCjWtHuwe4fHIkYxEqvKn8JReb+ogNv6BSLc2yg7BZ0Jx50mTly V2rGGG+eha2E7adX1NX01D5JjD1n1HvUdV3oyfA5FSDcwln6XIDNe4VhBmkNDKJtqrPw m9ZJvetlmQe2p1tH7XwPMEdV6O/h9kNsP11lsJP9X5VfVCmgyU962Ozqw5N0Zgfr3Vdk /8xLQ1ax/h0dK6Kaz/4u9BMv0qqHHgXT82zM627D5jnFE459elD0RLAg1W+rRXRW2DIC NTFWmrTWaaQjfv21Riz060CTAtyZvSkDj7Jbc1t5NmwVfLtMuUF3mfqbt/AZWnlVR+ed hjBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U9Ygf5x7uiOG9bCFzCQj8dmpy7ftJ6zlaTjCUCyvuWI=; b=CM75BIYszNB7i84/dS0GPq3/cfS/Z1X+oZX89mAiAES4ABp8mwlI3Z70JIoX8AaPgd b77jlsJmsX5j4SJ7HhnHgc1yax9E8xLci48yY3hEpaG0KnETAsVdlePQn1DUoftVdu2f 3YEfL8z5+SSLSZ0iB1MZpR3sYuxp1p0eYwLSMT/9rn0X6XEIpZ5v/cIUELw2FhHOK903 isoXIIo2GUiP4HqoNz1N9Ozw6gwRgPie0XkzVt3uoVRRWKz5oDrQA+DfRBjpi0lIFFJV HUyOFJxcLK6xE3eaoBCM7a9iq4N+xfqtJPF4zR8O2mdsyLVeNgANFpX1Ln1Q+Htd+NaH GJdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Xkh+xgvW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si2828374edb.365.2021.07.02.05.48.38; Fri, 02 Jul 2021 05:49:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Xkh+xgvW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232362AbhGBMtd (ORCPT + 99 others); Fri, 2 Jul 2021 08:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232168AbhGBMtc (ORCPT ); Fri, 2 Jul 2021 08:49:32 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F73C061762 for ; Fri, 2 Jul 2021 05:46:59 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id hr1so12537301ejc.1 for ; Fri, 02 Jul 2021 05:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U9Ygf5x7uiOG9bCFzCQj8dmpy7ftJ6zlaTjCUCyvuWI=; b=Xkh+xgvWJNg3rs9aU1QIxdqlP7Qlu2eqBL0oaeTo3OG58Ncbm6Gp8Urn8SjvIsvSQM wFO/WsLjGXApllsxXG61JcSWN+IGeCMIGEEOBA5FxGYek88RnNdww6AvExbD5YkGYwuT lbhWGkCtUmILyQhgBPtDrGdxYEmtT6fKHuMenJ20IKE2g3IvprjKgz4BObJQngx+vvDC 1CRdOqwZP+1WNLAnn0Eh3TJpzbvWiR6gAaQWHq48v5UgjrCTyDO+r2Kr7+0J3z4pBlLp wBPA+qUzsaerhCA11tVOQqAr9JEAyBeb/Jtt1+h3U1DUs5fu01UYEOPKZu5+8e3WF509 f4oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U9Ygf5x7uiOG9bCFzCQj8dmpy7ftJ6zlaTjCUCyvuWI=; b=p3KID59NG64ipoj/Wf/4t0rmkcTKw7KpiNF+Ddu9NDj/wz6u8zGQlnrL7NsqG1fwb6 2Ok9yHCp6T2JL9wdN2ARBZdS5DVPxijMdawc7Dh09aNnGl1487qJbHXoPE7HZULnfIU6 kMIYJVlMu/69WHNRD2aRLLJBmxzE4VAFBu9V7xiH1Fxey0BjOuuh25SfPYQobMfnCv46 iq/X+saQ+J22sJD4oaZzGQ8XaM9FV7UBA5XBtEOuqzS6WqSyXLzu1VLFRMz6RZnudSLQ SQR+hoO7a5Jazy+CsuSKxx2eE0rC4huAqA0HRjsVJgBdhd5wLsZ7SLaej4HT66F2EKdv 0P8A== X-Gm-Message-State: AOAM532mahl2aohBGFCpm4hE+faSpsm6QR1TGyDPRs2NfsR1q9xKjyZJ ImFUNVgXUdsmdfDwbCbxozxCzvhWN+k/F2O7YNof X-Received: by 2002:a17:907:72ce:: with SMTP id du14mr3731820ejc.529.1625230017449; Fri, 02 Jul 2021 05:46:57 -0700 (PDT) MIME-Version: 1.0 References: <202106281231.E99B92BB13@keescook> <202106291311.20AB10D04@keescook> In-Reply-To: From: Bill Wendling Date: Fri, 2 Jul 2021 05:46:46 -0700 Message-ID: Subject: Re: [GIT PULL] Clang feature updates for v5.14-rc1 To: Linus Torvalds Cc: Kees Cook , Linux Kernel Mailing List , Bill Wendling , Catalin Marinas , clang-built-linux , Fangrui Song , Heiko Carstens , Jarmo Tiitto , Lukas Bulwahn , Mark Rutland , Masahiro Yamada , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , Peter Oberparleiter , Peter Zijlstra , Sami Tolvanen , Will Deacon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 29, 2021 at 2:04 PM Linus Torvalds wrote: > > On Tue, Jun 29, 2021 at 1:44 PM Kees Cook wrote: > > > > > > And it causes the kernel to be bigger and run slower. > > > > Right -- that's expected. It's not designed to be the final kernel > > someone uses. :) > > Well, from what I've seen, you actually want to run real loads in > production environments for PGO to actually be anything but a bogus > "performance benchmarks only" kind of thing. > The reason we use PGO in this way is because we _cannot_ release a kernel into production that hasn't had PGO applied to it. The performance of a non-PGO'ed kernel is a non-starter for rollout. We try our best to replicate this environment for the benchmarks, which is the only sane way to do this. I can't imagine that we're the only ones who run up against this chicken-and-egg problem. For why we don't use sampling, PGO gives a better performance boost from an instrumented kernel rather than a sampled profile. I'll work on getting statistics to show this. -bw > Of course, "performance benchmarks only" is very traditional, and > we've seen that used over and over in the past in this industry. That > doesn't make it _right_, though. > > And if you actually want to have it usable in production environments, > you really should strive to run code as closely as possible to a > production kernel too. > > You'd want to run something that you can sample over time, and in > production, not something that you have to build a special kernels for > that then gets used for a benchmark run, but can't be kept in > production because it performs so much worse. > > Real proper profiles will tell you what *really* matters - and if you > don't have enough samples to give you good information, then that > particular code clearly is not important enough to waste PGO on. > > This is not all that dissimilar to using gprof information for > traditional - manual - optimizations. > > Sure, instrumented gprof output is better than nothing, but it is > *hugely* worse than actual proper sampled profiles that actually show > what matters for performance (as opposed to what runs a lot - the two > are not necessarily all that closely correlated, with cache misses > being a thing). > > And I really hate how pretty much all of the PGO support seems to be > just about this inferior method of getting the data. > > Linus