Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp984745ybt; Wed, 24 Jun 2020 16:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTCCdZjmV5vzvqbvbDv6YgyXnX7OO25SHZIyLoWofqqQBin2fVMlwZ6MAhgvgkrj5Wk7P+ X-Received: by 2002:a17:906:6a4f:: with SMTP id n15mr17715899ejs.378.1593041926503; Wed, 24 Jun 2020 16:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593041926; cv=none; d=google.com; s=arc-20160816; b=xh/HY+0AQj12y1qBcx8nAIlfPKiQdIl9zXJc86u2fsOPeDc8VmvlYI24hr+EWYDBvz xXdaN1YyrJQDI/Ne42TyXDPfhHAOM4i7G7GyC6bvFiQMJRO5CzSVy9amsm66rC6YKbai Az3nAqbhVXyJVEL+MTSQeycGLH0v4I8luHIen6ei2tphmKUPS0Z2TMXQCU1yn6Msl5fq BUqOvKTuz/F8TxBk9mF+gAcuYXpJ3VdIQcOBI7sY/NTJJ9yRTLQycf9qIVkq9F+RbwSJ bL+xh6DueyfHi7daIWr/I5boBidhgeU/h5XgAaXD7cOFf05j9S0QegLqwocbHT+Rlg81 UPPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mo7Dwe07kJhP63QLmOzciNFvW218NBaVIlEPp4HbWlg=; b=qJWN/pco4EQf1GIC2PzwVnfRKS2XLCpcgf+A615a3thUj0VMUSC2JfQVmUWSMiQM2C CoBht2Jw6I2InnB/zkK2cqYn3PkH64AVaVNlK97RFuMrBTtNxPd00N83KP6me+BYrq+m 4J9JkjJo2vUfagplfgmJ/r0YQ3bmLIWX+nhNlJ13P/RIek6ZA1b+P8bkqHsTI95MXFla BPTMKbz5B0PpdDtUPkOhuNWCxt9OFLYUfaoDhiTNoqAi0tuH3kfEzlBYu1R1eR0hRVtR gNgsat5ENIWkyuKcm0EKQ6jOOE5CmCx20L1p2Gt1yvF2+p2Ue9zbNV9qjGJ4HBa6uSLl 6PbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ghe0LNHZ; 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 c11si16002397edn.383.2020.06.24.16.38.22; Wed, 24 Jun 2020 16:38:46 -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=ghe0LNHZ; 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 S2388392AbgFXXhc (ORCPT + 99 others); Wed, 24 Jun 2020 19:37:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387843AbgFXXhb (ORCPT ); Wed, 24 Jun 2020 19:37:31 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72A9BC061573 for ; Wed, 24 Jun 2020 16:37:31 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id h22so2053206pjf.1 for ; Wed, 24 Jun 2020 16:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mo7Dwe07kJhP63QLmOzciNFvW218NBaVIlEPp4HbWlg=; b=ghe0LNHZStIXrutzWngNn1w8HnVKxzkKAANg+f3UNbpWa1VXDLTQLRRUxQiw0ETxf1 8IwO0ripMH+IKCR86WNY+ysG11jZ8MVO51xum9mEa475UtB+fdRpajYIKrof1LeRnhfw q/KZy9ALnBT7rcr/zSWyqYTnZ3OeY5pBxENZEDhKneGeIxS3jxNDb3T6z60V1Qc+Vdy6 OTaykXWX6WKsBL92+Zu8AYSrqkunkoROSncALDdIHd5jRSMEYzkTx2v4nRNz4Z77j4S9 tRCzT7qVWnXl4XZ9bSsfQVqiYUdUQyfJWFL+rlMfK7ACBBFVz6umkgQZxUMxIfkAgDuf rFfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mo7Dwe07kJhP63QLmOzciNFvW218NBaVIlEPp4HbWlg=; b=QfZ1f+WgA9LkTDl+PcD7W/wnUJ0KGhxgFw1OhUFm2YukIlb/uZVSxEGRmGSFaf2Vty tljSExzuzCfqJ1c4MR5B5qpXyh++sSFqUjY/4dZV0J8Iel57KgnSeO3OjSprJqI/60mD oaHc371oCqbgTV16S4ScnwUS/IOhycGUaSjDhGPR2i6APl7QD+CoSDBPG5CDdPc8m+wt ygvf+ncMSdCUXRWxme3Jrvh4qLmWZnekF8HepRzfZ+Xyo5o/C315FSGBu1tEGJ5umYGL y0RNANS6pThkdVKgRTrFHY8idqI6zIOayLx5nBGogN+P98qgXUeHM96xtfcjxYYCyhVs 9y6A== X-Gm-Message-State: AOAM530JTLaleTZFpdAKdBBf72tTaQOunyxJd0CaccS/L5KtqvOntd/s fWQdvaU0xIG55vh60UItzlanZg== X-Received: by 2002:a17:90a:9d8b:: with SMTP id k11mr267919pjp.10.1593041850610; Wed, 24 Jun 2020 16:37:30 -0700 (PDT) Received: from google.com ([2620:15c:201:2:ce90:ab18:83b0:619]) by smtp.gmail.com with ESMTPSA id c9sm21338811pfr.72.2020.06.24.16.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 16:37:29 -0700 (PDT) Date: Wed, 24 Jun 2020 16:37:24 -0700 From: Sami Tolvanen To: Peter Zijlstra Cc: Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, George Burgess IV Subject: Re: [PATCH 06/22] kbuild: lto: limit inlining Message-ID: <20200624233724.GA94769@google.com> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-7-samitolvanen@google.com> <20200624212055.GU4817@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200624212055.GU4817@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 11:20:55PM +0200, Peter Zijlstra wrote: > On Wed, Jun 24, 2020 at 01:31:44PM -0700, Sami Tolvanen wrote: > > This change limits function inlining across translation unit > > boundaries in order to reduce the binary size with LTO. > > > > The -import-instr-limit flag defines a size limit, as the number > > of LLVM IR instructions, for importing functions from other TUs. > > The default value is 100, and decreasing it to 5 reduces the size > > of a stripped arm64 defconfig vmlinux by 11%. > > Is that also the right number for x86? What about the effect on > performance? What did 6 do? or 4? This is the size limit we decided on for Android after testing on arm64, but the number is obviously a compromise between code size and performance. I'd be happy to benchmark this further once other concerns have been resolved. Sami