Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3483918pxu; Tue, 8 Dec 2020 13:19:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJym2TFWfAFM9/Ghqxh0aRXfn0vRzZTzX8CnWuDqIZYsP+SVVhalT+hYMiqJcqbO+BsqgaQ4 X-Received: by 2002:a17:906:234d:: with SMTP id m13mr25144312eja.270.1607462378167; Tue, 08 Dec 2020 13:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607462378; cv=none; d=google.com; s=arc-20160816; b=PvoTCFOZkLug/LEoMo9RZYj6hoghnZAGzrJgfhCTHlRRUN5IFcqBn/+sR1AltFSu/c OymwpSo1QUp3SjEodm5CswXK3YBc0dQrcJKSZiD2FZ+zImlOFPBfbF0SfnT8tzI1uZh0 MRBhR3imizUUK7E2XgyfoEsFD6s3aYzxQSkezSUsYfleqfWTDRDtWxNoqthFDQBoBmz0 dSU/DjYYsjhRK+qhjvmkDshMiDZzPb4ltp+SZMP41VDJ9lpJHXh597Lvi7AUzffJuvuu RjTcSNhNSu5gdLMxiuk265D9svX9WvuxQvb1sPGIdFMESgtayXW/UHD6r6i8qki4sCex jaGQ== 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=JlsOI1fRDP5hh5RRN78La/q8WBPdxUn50gvC+PZHts8=; b=Cknhw0f1wwYt1RWbaHTgREOKWIWhSlvICXbG8XgH6XSk86SC7aKX8ypFT66ja52R5r hF6NRg8mmGWH0OJ5TZqssHMMSwf4XXx45+8jjMDfsiiVALZlJDFItQvsuA1Ldq3SNcic AQhFyXLxMbglxN/BJRoMXs40sTuEJrmy+9cTp/SKOPyIs9rV9mZmaxk+KvVW/jtUPpVW L1RHfEPcDzVZFlk/OHISYd5mFbCTiH/SnXqFSeAjvkag1fZfBe7JFTU8LbT3m8PPz4fm 1vLmSarExuKMf1NJ7t6xGaYXNI709mtJI1rXtn8qumJjOysdZjujsBdRT6l5EtQY4SoT qp0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P0U7Ogd8; 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 h8si8706076ejf.491.2020.12.08.13.19.14; Tue, 08 Dec 2020 13:19:38 -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=@google.com header.s=20161025 header.b=P0U7Ogd8; 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 S1729873AbgLHVKz (ORCPT + 99 others); Tue, 8 Dec 2020 16:10:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgLHVKv (ORCPT ); Tue, 8 Dec 2020 16:10:51 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F375AC0617A6 for ; Tue, 8 Dec 2020 13:10:06 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id o4so13360813pgj.0 for ; Tue, 08 Dec 2020 13:10:06 -0800 (PST) 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=JlsOI1fRDP5hh5RRN78La/q8WBPdxUn50gvC+PZHts8=; b=P0U7Ogd8zoiY2n175d1X/g+/fJdAmGtiw6Ed5UHTXp8ErBagDDkxCwMTGBF9BCIOjy pbq/5qwvvmMeWHqUKqTbcNu+xhFsava13TOOa+wLsx8wIArkRm1a9Ar0K9/Kvv8AKw8K wAIbNzDXN/ALgxyANFROrjx2Duw9tqQCdjAO5s/bky5fQ31eeRIzwiwPCCeJ9G21PMfp 0uSk9B6jy06FghAAJqiXpgYoIS0I+PnwdJ8bmYhf7TSY4IKWk8Dfbpn8T2PQYftvQb0G TqVBRNnLA45BlEuMp1qEk5rIQLxsS4U1OGfqsttmRzHkFoLCsLcFH/cjS3FxF+XpxVrk VA1Q== 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=JlsOI1fRDP5hh5RRN78La/q8WBPdxUn50gvC+PZHts8=; b=Yjt0KP7B52t4Oesi+4a7ZsGaNL9bZAq9w55FtnaerJBnBExDGKXPAnXchyd5p2K6Qz +DErVA4AkXAcREi/AWJfBPz5VD1yKBnnyCyOA+ANxCzhKtLXkIKDTD8afPca4dMefy5O GkvN3Wmzch62JR0skZIG+WSvzpS+j3oLRKJH940QNeTVhUqMNMrLuhk+VDB7j/eT3grO VAmM6nEwLSmOJpsCDElfIoOrm3t+0uusSAasmvrO1jReW7dbeulRTR5qFG7QNBx8wbiq xg+sfUUTvxWMyhsTWAhufMV/xEvvyOYCl+rlmuY9yT9xxrrn5EydTWNBpHIOal+Hh+C+ BKAA== X-Gm-Message-State: AOAM533uNk767SxCTes8sXLYqtGeCSJFfuKdOV/100fDx2Kqv4OkUDSt WOe92WQy23prSEhhyFd4ics9OCJbOAIi2TWbL0Xwqg== X-Received: by 2002:a63:3247:: with SMTP id y68mr4840pgy.10.1607461806350; Tue, 08 Dec 2020 13:10:06 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 8 Dec 2020 13:09:54 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Arnd Bergmann 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 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 . 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. -- Thanks, ~Nick Desaulniers