Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp385013img; Wed, 20 Mar 2019 02:45:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRI7FXExJo6nas8E9aO/Y6wqg4JASaXzUgWbPWekWIgUBGgs/3eqb/9HeqtEHnOChgxYtN X-Received: by 2002:a17:902:a7:: with SMTP id a36mr7530481pla.267.1553075113421; Wed, 20 Mar 2019 02:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553075113; cv=none; d=google.com; s=arc-20160816; b=nEWUaMY/m8aRW6g2FeHZcIWTJ921N0qowpwXFdNBNO4gR0Tgxt1ibUr3k5JX7u0RR6 w9/nhPE4rJQNnByV+k4DBnSPNuHeuQLI1Xj3rKK7RwUH7ggtuydLyID92YzZB7XorbWo M9Y+0g+RpyexNAuYUtEIJJH85iepLwH/bvWnNO1oHaZNzJ/gEYY6Zvax+Cd6dH0gn6E2 hHI/JiJr5TpMIhhr6LI21Z/sjx+XjkUkaTRKmBNcBgVZuFLd+wqnBT4/xEr8wVv5kiBX usmVeCuukGwEQARrCQ/mBc+fWj9vac4zMMom5oAVeBWtojxrk+cgOTdmv+bemAB+lS/Z cswA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Wcem8o0HHIzqutiHXBbDWombZs0tH1uJm1IkFEOS1gM=; b=CZdyaJwjqWN9y94hOScScWCUuEu3jnXLrk6RqgXEhJStwPB/rjvEs9yrae07XTw2/q fxXjlxBKLcQE/IPRoaBlcb2dHmREj5+3FpREaCD21WLvKVj0QvnSqrFcJMyT6Q4eUoN1 Xw4t5OYI5SPOzDBztDgNGjLKYzvB3clgP9yzW9qkNhmHBj/+CwdTU19TfdiVoPNQlDCd wReRzyng/I0RAeyvHv2TXOshgMFuIbYsg3xNBz/NrwsOtu1acz17LT1tFf0lS/nzxKRx Cu/f9F1rbGBpuWuAoTUzVfKTW2iwAk5LK9RZNbW3aqcaMlheBa6vjVsm42vN9dxh0yEF jg5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si1224849pgr.203.2019.03.20.02.44.57; Wed, 20 Mar 2019 02:45:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727413AbfCTJmC (ORCPT + 99 others); Wed, 20 Mar 2019 05:42:02 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:43737 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfCTJmB (ORCPT ); Wed, 20 Mar 2019 05:42:01 -0400 Received: by mail-qk1-f194.google.com with SMTP id c20so8913860qkc.10; Wed, 20 Mar 2019 02:42:01 -0700 (PDT) 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=Wcem8o0HHIzqutiHXBbDWombZs0tH1uJm1IkFEOS1gM=; b=K00Zg9JACrnbs/JhvwjDpPiHiu2XYf6RNfh7dywAcagQkS0qyCc36otGSKldfF64AS TlqER+c4AmmlTP/JJnoDF9Gkmw6BKzjJut3b8RSsHejXUOTd7UkGXXWyjMLoX/JEhVGl V37efC6Hvkb1QNjE4R4Mf2KUmUR0HR4pA+UFz7CtBxThsg4WJJglpO+bXOsZxGmjfSlk 4Ee4eEnxjPD8VwQGh+Bu91e7hIZQIOR63N7q2rLElLH62/6Yu6B8UAFima093nB3grEp EOzC5Z87Dl5lFUZzPDsPK4UVouqMzcUMbqmBcpO/zW8fq9zB9Lybv+bZWIytUE7SrKu2 bYcw== X-Gm-Message-State: APjAAAXQllMFQG1x6kBBD0cHUGtXp4t01USZrPxo93UAve+70bGD7rJm KOnvn0U/BJ4YHsSt5YJaVa5YWKrSp/w5G/tWkOU= X-Received: by 2002:ae9:dec2:: with SMTP id s185mr5394316qkf.107.1553074920561; Wed, 20 Mar 2019 02:42:00 -0700 (PDT) MIME-Version: 1.0 References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> From: Arnd Bergmann Date: Wed, 20 Mar 2019 10:41:43 +0100 Message-ID: Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING To: Masahiro Yamada Cc: Andrew Morton , linux-arch , linux-s390 , Dave Hansen , Michael Ellerman , "the arch/x86 maintainers" , linux-mips@vger.kernel.org, Linux Kernel Mailing List , Paul Burton , Ingo Molnar , linux-mtd , linuxppc-dev , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 7:21 AM Masahiro Yamada wrote: > > Commit 60a3cdd06394 ("x86: add optimized inlining") introduced > CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. > > The idea is obviously arch-agnostic although we need some code fixups. > This commit moves the config entry from arch/x86/Kconfig.debug to > lib/Kconfig.debug so that all architectures (except MIPS for now) can > benefit from it. > > At this moment, I added "depends on !MIPS" because fixing 0day bot reports > for MIPS was complex to me. > > I tested this patch on my arm/arm64 boards. > > This can make a huge difference in kernel image size especially when > CONFIG_OPTIMIZE_FOR_SIZE is enabled. > > For example, I got 3.5% smaller arm64 kernel image for v5.1-rc1. > > dec file > 18983424 arch/arm64/boot/Image.before > 18321920 arch/arm64/boot/Image.after > > This also slightly improves the "Kernel hacking" Kconfig menu. > Commit e61aca5158a8 ("Merge branch 'kconfig-diet' from Dave Hansen') > mentioned this config option would be a good fit in the "compiler option" > menu. I did so. I think this is a good idea in general, but it is likely to cause a lot of new warnings. Especially the -Wmaybe-uninitialized warnings get new false positives every time we get substantially different inlining decisions. I've added your patch to my randconfig test setup and will let you know if I see anything noticeable. I'm currently testing clang-arm32, clang-arm64 and gcc-x86. Arnd