Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4025955pxv; Mon, 28 Jun 2021 19:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/gChJZXZzcw30NMyscxKiXLN4kjYPJioRmGcXRi+hDSoYEb2bntUCCrQ8JkOwRcnASaq8 X-Received: by 2002:a50:fe8d:: with SMTP id d13mr36985206edt.14.1624935047553; Mon, 28 Jun 2021 19:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624935047; cv=none; d=google.com; s=arc-20160816; b=GPPbMT50jsQZHP9R2baz9IqNHAdb4w/+8u+07PtVc7jZAFCNdtbic1X/J+q737B3GE FWhOo/xmIn5Q8gN3KunE7PHC93mECEHpBuOGOkQQDYIgjn9areON/RVqPxP8t8WjSKqo Z9PvzIXjqopBCXK8H9wiy3uLVJ9I2GCDk9VRAJUA0pm7sywvA49M5Vf9ZDwxJEwwceP3 z7IjAyS8vTMU3tYc/4MHbMFh0N8ouMnkNMaKf1REVdtZ8sGMawV77DSPMk2YuP/XQjZV KOD2GlZ88/zVX76vPNrYBrsEjxEbB5D8K9Zsk05Z7k+8EkZLPXxwuIJlq1dWAq7pxcZY qnkg== 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=UEYEWsL6AYbcFkTNzTHp7v10JIwWkeD8uKj1umSmXwA=; b=WlfxI7re16uXolI/WgplOWMtkYU2bHaqLSO5XMIXSvOpWgbIDFN8AJU3EzCMhg4G23 cg5eAmS8rGsEa13AXt/p/qgTMjyE4DmdFXaBxlDqLxUcTyZyaLFFBqaNp7HV+/WUjLHf 409OtvTLnpsHTCZvbzcpVpidMUoDPqZxGstWhIEFr3kkE/SC/gr4HWhhc6Ih/4F/Tpo/ ZiX965YnavbG2VuNrHVAY/PniEleSxitgcesUhijodAtJgwhrmVRE0a3gzdOc4eCYdYQ tVd/2LCCJ5NijQ7oBCHqbZ1/pWaageKyXqhBRQ0eIt3SmDYji/rSCIAbkdVeO8+tMlo1 p1Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Lpyx5Bj2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si15839281ejs.124.2021.06.28.19.50.24; Mon, 28 Jun 2021 19:50:47 -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=@linux-foundation.org header.s=google header.b=Lpyx5Bj2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231706AbhF2Cvv (ORCPT + 99 others); Mon, 28 Jun 2021 22:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbhF2Cvv (ORCPT ); Mon, 28 Jun 2021 22:51:51 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 877F9C061574 for ; Mon, 28 Jun 2021 19:49:23 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id w11so8261827ljh.0 for ; Mon, 28 Jun 2021 19:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UEYEWsL6AYbcFkTNzTHp7v10JIwWkeD8uKj1umSmXwA=; b=Lpyx5Bj2FcftcCrXmBzDWUDVMi85k+alslccDNNzT2sy9TZr+o5YMzW49BCWGW0Pz8 fV42wKrD4m7NjjN59cr/cZ+sfc+jIdmrAO/WA1Nbs9M/eomzbiRQ15jSyUQ6AsFtkb6d qImhg6ibpe3RcYDOx4i8j+f7Ydhv3wdQ6Gcbw= 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=UEYEWsL6AYbcFkTNzTHp7v10JIwWkeD8uKj1umSmXwA=; b=c4BypsO6/H55jQce2R7ut2ek3VQkUgzsmWNIrPPKxs4LmRw0OVLYg3jkaUBqdMA+oA lEsw8V0gsMd2kjClqXoUrvBKjJYYkq1/wTcrZGACcgwFkWymuiDxPFtHvXh0BbPIZ/1J 7uvpR21W0tv8q4sQUQ7qcNxV/83h1cKfZb8lzhsN9gb2x0THOKSUKdQbk8AWLCDJh4WT bQNUqfT/FEkhFs6Z+2awUZl4pXxfednXB9VS50xRfJGAre4u4Bm/Xed6YDg/VSeSbdj9 FxF670tMoqIasBcAb3n3npE1EFXtec+QMxcPKXoftQYDSNCsCIlFwXTNXwwOjn5HLvEb hvZQ== X-Gm-Message-State: AOAM533T75MrFrIjy/ClIe5FE3G+oXRmKpUxd7FaujAhwnouIIGxRwKO D26en5CffrX46cLCnv0dGhBzfoU0jOHw64xI X-Received: by 2002:a2e:9a8a:: with SMTP id p10mr1971593lji.221.1624934961640; Mon, 28 Jun 2021 19:49:21 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id h25sm1354768lfe.284.2021.06.28.19.49.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 19:49:20 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id u20so3150256ljo.12 for ; Mon, 28 Jun 2021 19:49:20 -0700 (PDT) X-Received: by 2002:a2e:a276:: with SMTP id k22mr1919160ljm.465.1624934959943; Mon, 28 Jun 2021 19:49:19 -0700 (PDT) MIME-Version: 1.0 References: <202106281231.E99B92BB13@keescook> In-Reply-To: <202106281231.E99B92BB13@keescook> From: Linus Torvalds Date: Mon, 28 Jun 2021 19:49:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Clang feature updates for v5.14-rc1 To: Kees Cook Cc: Linux Kernel Mailing List , Bill Wendling , 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 Mon, Jun 28, 2021 at 12:32 PM Kees Cook wrote: > > The big addition for this merge window is the core support for Clang's > Profile Guided Optimization, which lets Clang build the kernel for > improved performance when running specific kernel workloads. This > currently covers only vmlinux, but module support is under active > development. (Sami Tolvanen, Bill Wendling, Kees Cook, Jarmo Tiitto, > Lukas Bulwahn) Am I misreading this? The PGO data seems to be done by using clang instrumentation, instead of done sanely using sample data from a regular "perf" run? That odd decision seems to not be documented anywhere, and it seems odd and counter-productive, and causes all that odd special buffer handling and that vmlinux.profraw file etc. And it causes the kernel to be bigger and run slower. The actual link to the clang pgo documentation even says that there is already support for converting regular "perf" profile output to pgo data, yet that model isn't actually used even though it appears vastly superior. Why use an inferior compiler instructmentation profile when we have the much better tools? Linus