Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3519184pxu; Tue, 8 Dec 2020 14:24:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm0J6YWGg2KcOf9BuyY5kzqg0kkd3zyzE71MMlhVYu4oJL+6EZ4dDzx8PrLlhjVX4YxyXf X-Received: by 2002:a50:fe87:: with SMTP id d7mr90385edt.381.1607466272697; Tue, 08 Dec 2020 14:24:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607466272; cv=none; d=google.com; s=arc-20160816; b=nkSOShWc9GATreR5cwmeRT7wvrjL1CxZZNUuCrVbV5/B8emqmcrseal4ry/+8RiqjT 8RNdqAuBdCndThsunPzVtAe8soJnge+Mut4KTL5wMO/Zcf3dcGPWxHrJar2usbdMGSba QJSZx4VLipAmLwIK7UgZnqjekWzilBfeVpuB0IN1qxJPs5JPWplAdY4Yj5W0K0HYh+QM +/6OURcW15hNzWFGqLFPcUqNLVqxN3FpeEHQrr5wD+5fcMMeD9EnKOP9DXIMIUnz5s2V 8+sQsN83SZwyO5zuv1fPL2LI6DfTxJWHL8iPhF7oTsFUva62sYtPyLRyTjHgZO1GGM3C l8pw== 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=FvH8eq+6SI3IkDKzFozVZmc2bnW643AjS0LbmfFowoU=; b=ubSfE5fBIS893cSCDTnIydzyuNHUl9rzQyu+Vo/XB1JN4e5/bhWctJOHuE8jz/tSsq v5LkEB3tHSOG8yAymAwmKq2tfazyx0EEwTSIJHQiisKyCzg375VuRv7kGcpuCVNb3/7A COthAayBilG0+o7zXUSsfo+toVfePgJ1bnKWKX1h2p5E23xEpl5L3ON3FTEZGookuZcS jTfj1RBP0qfk9qJj/FuRlczSiboUroClTsGyyjWQVGfDB0/J49duT/emuC+j0SF/LhwS kDFAtlqGKC/Pie16ImklSUkUof5e/GfHOjQ3zfns4qECRH2ECQmOCZW6VtxgW7cu4xDy JdKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gSkizAjG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb13si8757576ejc.320.2020.12.08.14.24.09; Tue, 08 Dec 2020 14:24:32 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=gSkizAjG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730823AbgLHWVb (ORCPT + 99 others); Tue, 8 Dec 2020 17:21:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:57940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730678AbgLHWVa (ORCPT ); Tue, 8 Dec 2020 17:21:30 -0500 X-Gm-Message-State: AOAM532h2v33jj/ubi53QxOUS4fO7/pvhVPw/mMsXnFce50Kmd5ELYid 4E+0vELTZQp/AU7Zgt4HCB7IWyvCVmDSd3Uu5yE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607466049; bh=8y0P41eu0vrpOJeHzaBUZ9o4sOukFpEZzShJXEuuTDY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gSkizAjGxLc0+AVGqS+JixiihOGYSXdfGwlEEthB3lNE4PHMREDewI5VO81wOOddC 3/AanEtVisMBlpZzZHNsMKbl9KV69BN0lodxF98JeLKqaNJ7xzaDngsmmOqXoQYsFp g+I6B7Cm3sXq8gq473wvzBgECIOpHQc2b75rFjatHNedzz13rnSjS4GkaneyiCEwsm g5zNg+sOgHPqdTVvL+X2Tx0fK0gHGPA4NfA09S2rehUYcmT3dTle9N9lKm0IPuPccy teMFgzt8NUgSGKdVxOAGq1K3T0ScBVdYlwcaYh27/WhCtNUXpgwp8eu8LfCPOqrGlI 2TxPXiU/wR52A== X-Received: by 2002:a9d:be1:: with SMTP id 88mr215992oth.210.1607466049167; Tue, 08 Dec 2020 14:20:49 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 8 Dec 2020 23:20:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Nick Desaulniers Cc: Sami Tolvanen , Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , linux-pci Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 10:10 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Tue, Dec 8, 2020 at 1:00 PM Arnd Bergmann wrote: > > > > On Tue, Dec 8, 2020 at 5:43 PM 'Sami Tolvanen' via Clang Built Linux > > wrote: > > > > > > On Tue, Dec 8, 2020 at 4:15 AM Arnd Bergmann wrote: > > > > > > > > - one build seems to take even longer to link. It's currently at 35GB RAM > > > > usage and 40 minutes into the final link, but I'm worried it might > > > > not complete > > > > before it runs out of memory. I only have 128GB installed, and google-chrome > > > > uses another 30GB of that, and I'm also doing some other builds in parallel. > > > > Is there a minimum recommended amount of memory for doing LTO builds? > > > > > > When building arm64 defconfig, the maximum memory usage I measured > > > with ThinLTO was 3.5 GB, and with full LTO 20.3 GB. I haven't measured > > > larger configurations, but I believe LLD can easily consume 3-4x that > > > much with full LTO allyesconfig. > > > > Ok, that's not too bad then. Is there actually a reason to still > > support full-lto > > in your series? As I understand it, full LTO was the initial approach and > > used to work better, but thin LTO is actually what we want to use in the > > long run. Perhaps dropping the full LTO option from your series now > > that thin LTO works well enough and uses less resources would help > > avoid some of the problems. > > While all developers agree that ThinLTO is a much more palatable > experience than full LTO; our product teams prefer the excessive build > time and memory high water mark (at build time) costs in exchange for > slightly better performance than ThinLTO in told are important>. Keeping support for full LTO in tree would help > our product teams reduce the amount of out of tree code they have. As > long as help > sell/differentiate phones, I suspect our product teams will continue > to ship full LTO in production. Ok, fair enough. How about marking FULL_LTO as 'depends on !COMPILE_TEST' then? I'll do that locally for my randconfig tests, but it would help the other build bots that also force-enable COMPILE_TEST. Arnd