Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5993773rwb; Mon, 14 Nov 2022 12:34:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5byalW2Sf/ZEzcqE5qimqXwkLnthxWMc1qAcweHzKBtwV0rHHfC5J/pwERblY3uefkZOf/ X-Received: by 2002:a17:90a:6f61:b0:215:db2e:bb17 with SMTP id d88-20020a17090a6f6100b00215db2ebb17mr15279608pjk.166.1668458092799; Mon, 14 Nov 2022 12:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668458092; cv=none; d=google.com; s=arc-20160816; b=RiUwuDVNIpIyYNNIXE7M4u1ENb9LcfGkx49pUc7DMOcHM5BtM5zsSXgxFTCLOuJVko abCb0NL48JhlVxjd4B+mtZLZIZsKDlorYUeeeKH3Q4J4SeMOrsHpH5DYJiuUFmQFbW8T 08fqU9LYC0i1rKbrrYJ4LWR8smBryn/nGMUoMWJby1mDxuuDF7kvFbbtuQXscVIuPsQr Ow151eC9e5PJxy+Fi+rxLBY58keeh6ayLO4C8hDoMiuVrSzEKp3Yu3KDklKz3xd1ettI NLfS0AgcukniWT2JEDyPhLt+M6G5l3/SC/Nb15CeCzVGm1esPkTjid0fZmG87K7hR9IS nehg== 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=Yjhrm1mQ85dvzm5GMKPRvPsHrvN6TqeEv0uHN02KC6E=; b=jt1JB1BFzLOC3mMGkxwKSKUo4bXGNElZKVo8zQnKCp7ZKXK7950D/HxpPAe59yENYD idv3aI37MINvUAoZhVRoguyg3zGeeMHPA4j5hwbflVpalPhtobTDVSGVyDAjOY3W6avj z24n3EZzPPnCYviO+J7LI4vw78yUPyAN03aAho9aZdknAAaFll93gBwmX4Ww9J1vAyEr hik9MCD5ZeR4uCMgNMFdrVeVbKjyWnEZNn6hj5kwpTUSe7Jpj9C1B3U+yZ7uzv3NP5+L +ec0Nt9eXweszC6ndXlUuf6imsYrQjk0gSuKzD59lu1QniOXazy0Ihg+G7QBAl9l8RVD H1RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gn1WBypS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a170902db0300b001884ba979e7si11711780plx.194.2022.11.14.12.34.41; Mon, 14 Nov 2022 12:34:52 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Gn1WBypS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236665AbiKNTlJ (ORCPT + 88 others); Mon, 14 Nov 2022 14:41:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiKNTlI (ORCPT ); Mon, 14 Nov 2022 14:41:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026BD639A for ; Mon, 14 Nov 2022 11:41:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8ECF8B8121C for ; Mon, 14 Nov 2022 19:41:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38F52C43150 for ; Mon, 14 Nov 2022 19:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668454864; bh=Yjhrm1mQ85dvzm5GMKPRvPsHrvN6TqeEv0uHN02KC6E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Gn1WBypSvjJPpzlJ1rm4/5OxXED9DYHuwe6qMg3AHoom2A8QCVb2rX2SLhrFKojEA A3ExNZHAvbSMJrb53EyX+a/5ArAvW4B00alUx1a90yXKOxqr8hZPDrkQwUUDsnFK+1 0ghR2MdkSw4W4UxfMLgaDuXfdjTu9ctL5rMStGS/FwrGFB9QofJ+kY4MMtag1yTonQ BWcneVBSAsohLgIYXEzZictjHufXFA3t+Tr+aahhM1Z2nmyM1hrSNq0xY/BDpKwZsx bu/RL6mgFcME0RZrJqFqeRiyJFIr6795ymZ7H3UajjmbQqlY/NF5q38MGGfP22wtJP FOZcqNPdvz/0w== Received: by mail-lj1-f182.google.com with SMTP id l8so14629243ljh.13 for ; Mon, 14 Nov 2022 11:41:04 -0800 (PST) X-Gm-Message-State: ANoB5pn2RFzp6ad6m2Xnnn0ZHIkdSIZ83bmICuM7lyPk/N4mZZIy/PHu wjZL/QejglT5K7L6N9te+aM832ILKGVlzi1ZMak= X-Received: by 2002:a2e:2d09:0:b0:277:72a:41a5 with SMTP id t9-20020a2e2d09000000b00277072a41a5mr5233918ljt.352.1668454861882; Mon, 14 Nov 2022 11:41:01 -0800 (PST) MIME-Version: 1.0 References: <20221114114344.18650-1-jirislaby@kernel.org> In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> From: Ard Biesheuvel Date: Mon, 14 Nov 2022 20:40:50 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/46] gcc-LTO support for the kernel To: "Jiri Slaby (SUSE)" Cc: linux-kernel@vger.kernel.org, Alexander Potapenko , Alexander Shishkin , Alexei Starovoitov , Alexey Makhalov , Andrew Morton , Andrey Konovalov , Andrey Ryabinin , Andrii Nakryiko , Andy Lutomirski , Arnaldo Carvalho de Melo , Ben Segall , Borislav Petkov , Daniel Borkmann , Daniel Bristot de Oliveira , Dave Hansen , Dietmar Eggemann , Dmitry Vyukov , Don Zickus , Hao Luo , "H . J . Lu" , "H. Peter Anvin" , Huang Rui , Ingo Molnar , Jan Hubicka , Jason Baron , Jiri Kosina , Jiri Olsa , Joe Lawrence , John Fastabend , Josh Poimboeuf , Juergen Gross , Juri Lelli , KP Singh , Mark Rutland , Martin KaFai Lau , Martin Liska , Masahiro Yamada , Mel Gorman , Miguel Ojeda , Michal Marek , Miroslav Benes , Namhyung Kim , Nick Desaulniers , Oleksandr Tyshchenko , Peter Zijlstra , Petr Mladek , "Rafael J. Wysocki" , Richard Biener , Sedat Dilek , Song Liu , Stanislav Fomichev , Stefano Stabellini , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vincenzo Frascino , Viresh Kumar , VMware PV-Drivers Reviewers , Yonghong Song Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Mon, 14 Nov 2022 at 12:44, Jiri Slaby (SUSE) wrote: > > Hi, > > this is the first call for comments (and kbuild complaints) for this > support of gcc (full) LTO in the kernel. Most of the patches come from > Andi. Me and Martin rebased them to new kernels and fixed the to-use > known issues. Also I updated most of the commit logs and reordered the > patches to groups of patches with similar intent. > > The very first patch comes from Alexander and is pending on some x86 > queue already (I believe). I am attaching it only for completeness. > Without that, the kernel does not boot (LTO reorders a lot). > > In our measurements, the performance differences are negligible. > > The kernel is bigger with gcc LTO due to more inlining. OK, so if I understand this correctly: - the performance is the same - the resulting image is bigger - we need a whole lot of ugly hacks to placate the linker. Pardon my cynicism, but this cover letter does not mention any advantages of LTO, so what is the point of all of this? (On Clang, LTO was needed for CFI, but this is not even the case anymore)