From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AE07C10F0E for ; Thu, 18 Apr 2019 13:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05C05217D7 for ; Thu, 18 Apr 2019 13:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555593654; bh=tB6W23DqVoY0ovjvn+gfIFqrcvOuFPUUX6EhZ2Swf2Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=PlUGmN4IUHTzfNo2RxTGOszuf8BtGD7Sjr9WX2Yuf8a5uEKyeGoM+iZ7Q9t9XdtUW MdZ6n0V7RrEygq3vv3+kJ+EYS+hOKrxI5DouLbqSOPJ7QcIZi3tNGNmcIPZmz/HFVC 5tXnUwQ+EmchSA8rs+C/baG8ItSoBWc4fMuNoPCU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389011AbfDRNUx (ORCPT ); Thu, 18 Apr 2019 09:20:53 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33744 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727807AbfDRNUw (ORCPT ); Thu, 18 Apr 2019 09:20:52 -0400 Received: by mail-wr1-f68.google.com with SMTP id k1so1780371wrw.0; Thu, 18 Apr 2019 06:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=OBVI3mxBq7hJJ7GMq63UZAs5eDSNSQHVMQhmsRcAzOUlEvQybBl1shmYvk0PdKKK5/ 0AT3aJ9peUWu6DDE2+uo/dmc7PEUAwXzlwkLRi6iJQAHlOzIPupYPzVxLR6BgJ1aoE8/ PaA7Uf6uU6WdoZEbRyIT6Bl8wnNCRk7UlthLWf1af5Bs/hdbglOXeyfrugNoRNZbu+ve K6oedra3Ss9p/ADCD3fv4vNKJ1x2sNjXk8UGfrCFuaZT7pQkl/USfphp6YQaSoQn1qZZ OJjlYQjkhJvXBlSdRxhmEm7YT/CUd/7rFK/KQcjGeGoFbZTeIJoWsQ6fLUy7H1fnUd8s b6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=HyAedJ13BSndJyNGMfLKRQ35i4vThDLmzI3hShhbYtODM/y/VId9Kt9S22Y0acdgQ8 n4ii6hTWqXEbmR5bLiMYB5V4ulQa9fGzkY4arMvxhAsb1xmZK/0mASRwxmZBoo+XEH9L Qhr8qOwzc/jg+w2Yxh3z8ysyUeKShRMcPFoBYBi+EVYmPUsmRwlN+tTJJPmYhkRcN4as DUX+Z9/7d1Ok51P7/I1foRT2T/dKWcnnSvhKFZMrgEr2gXeooYRh81X/hgDXv9CHpzfE aWCmxJp88yuOrrjzl4SqfyNKbWd5DgbCFJbXXlmRntbO2mzlJpMDUD/hm8tfWv0quQiZ 3epA== X-Gm-Message-State: APjAAAUBXnIn3sfLDDOVXwY6OkmT5h2hykRKX/nOhWUTWFcxRZEX1BrC P1qc0nUQiLwzTn9jrrndrEQ= X-Google-Smtp-Source: APXvYqzJ/ySJ+z0VjPKhlTQyMQFU1iuU9BCAPDw4iU0TqindWFDaAlZ0lD4Q/VA3V2aWhbWS1mn+aA== X-Received: by 2002:a05:6000:1111:: with SMTP id z17mr282634wrw.103.1555593650693; Thu, 18 Apr 2019 06:20:50 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id r18sm3417736wme.18.2019.04.18.06.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 06:20:49 -0700 (PDT) Date: Thu, 18 Apr 2019 15:20:47 +0200 From: Ingo Molnar To: Masahiro Yamada Cc: Andrew Morton , linux-arch , linux-arm-kernel@lists.infradead.org, Ingo Molnar , Paul Burton , linux-mips@vger.kernel.org, x86@kernel.org, linux-mtd@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Dave Hansen , linuxppc-dev@lists.ozlabs.org, Michael Ellerman Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Message-ID: <20190418132047.GA21430@gmail.com> References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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. No objections against moving it from x86 code to generic code. Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DEDFC10F0E for ; Thu, 18 Apr 2019 13:23:44 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52DC2217D7 for ; Thu, 18 Apr 2019 13:23:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBVI3mxB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52DC2217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44lKYm5kxTzDqSB for ; Thu, 18 Apr 2019 23:23:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=mingo.kernel.org@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OBVI3mxB"; dkim-atps=neutral Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44lKVf2jN4zDqQH for ; Thu, 18 Apr 2019 23:20:54 +1000 (AEST) Received: by mail-wr1-x444.google.com with SMTP id t17so2923620wrw.13 for ; Thu, 18 Apr 2019 06:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=OBVI3mxBq7hJJ7GMq63UZAs5eDSNSQHVMQhmsRcAzOUlEvQybBl1shmYvk0PdKKK5/ 0AT3aJ9peUWu6DDE2+uo/dmc7PEUAwXzlwkLRi6iJQAHlOzIPupYPzVxLR6BgJ1aoE8/ PaA7Uf6uU6WdoZEbRyIT6Bl8wnNCRk7UlthLWf1af5Bs/hdbglOXeyfrugNoRNZbu+ve K6oedra3Ss9p/ADCD3fv4vNKJ1x2sNjXk8UGfrCFuaZT7pQkl/USfphp6YQaSoQn1qZZ OJjlYQjkhJvXBlSdRxhmEm7YT/CUd/7rFK/KQcjGeGoFbZTeIJoWsQ6fLUy7H1fnUd8s b6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=JDGr6a0r1qausaksWl0Qw5RAj1RwZfFvyxlCIzhMJBau33s4gRyDZGdenn/LffVYue T5siNf973Lk2+bZNCyC2sOJLlEzQ/hIptzvNDy9RnwbMU+xdWSVVCMrSZY5d8v8S8QbL 8WjKkC8rUHldBDGxW4xpmWXIPl8SyNSGzhZT5jjMTkdUHOvxGRiWA7/H49g5ZKytS0Wx HuurD5GYGe9i4ZiVk12Hosigfehf+k23ByUEhY1IEhUIe9oAAlwyAhmou0yeVjCK2uFO r49x75xyR5w0y9jMzaqQLKTVsx/85NkeMosdQYr/lOZiqcBc10/zMVLfgrBqQ4NLYdP/ vCtQ== X-Gm-Message-State: APjAAAWj0PVBbjc6A5R1GNJ5f9uRPSaN9w4HcsPcWfLo7cOF3ddePB1M yGpOhEbBk1chgAqTG/+LpOA= X-Google-Smtp-Source: APXvYqzJ/ySJ+z0VjPKhlTQyMQFU1iuU9BCAPDw4iU0TqindWFDaAlZ0lD4Q/VA3V2aWhbWS1mn+aA== X-Received: by 2002:a05:6000:1111:: with SMTP id z17mr282634wrw.103.1555593650693; Thu, 18 Apr 2019 06:20:50 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id r18sm3417736wme.18.2019.04.18.06.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 06:20:49 -0700 (PDT) Date: Thu, 18 Apr 2019 15:20:47 +0200 From: Ingo Molnar To: Masahiro Yamada Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Message-ID: <20190418132047.GA21430@gmail.com> References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , linux-s390@vger.kernel.org, Dave Hansen , Arnd Bergmann , x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Ingo Molnar , linux-mtd@lists.infradead.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" * 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. No objections against moving it from x86 code to generic code. Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4459C10F0E for ; Thu, 18 Apr 2019 13:21:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71E58217D7 for ; Thu, 18 Apr 2019 13:21:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gLK8Qfdo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBVI3mxB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71E58217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nfkcPWj8C78dvsMK8kblkzpZAc38iFGMMv0py9S3TuA=; b=gLK8QfdoSlJGJv sacXervU9Q+TINxKffsnULgz3Do7InuLnoc5GDxpfcVP5jBlmC26XHkvyOUz5qH7aoRjSmPFyIEQ9 tfETv4fn/whbUmpL4mgsrFMX322hc3nbzVIPEXuJiqS95H5Avf8iYvfNyKYnkhMj7E7TlYCqW9NXv oedbiXVutV7rxk+9cpaYks2QbUcaNGaHW02c/PQp0l3Ln5usIExN8FS/OxtXuVSlDG7LRK2gjg+KZ UCGmRhz14d3ut/R4/BPfdDMhR0P9htVQc+6GessFz+isXab+xkx5D6ydo6WwDk70e0nkjEtbrynfT CwkQLKMlzURGWDsNPqPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH6yK-0008Ov-5R; Thu, 18 Apr 2019 13:21:00 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH6yC-0008Hc-0k; Thu, 18 Apr 2019 13:20:53 +0000 Received: by mail-wr1-x444.google.com with SMTP id w18so2928667wrv.11; Thu, 18 Apr 2019 06:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=OBVI3mxBq7hJJ7GMq63UZAs5eDSNSQHVMQhmsRcAzOUlEvQybBl1shmYvk0PdKKK5/ 0AT3aJ9peUWu6DDE2+uo/dmc7PEUAwXzlwkLRi6iJQAHlOzIPupYPzVxLR6BgJ1aoE8/ PaA7Uf6uU6WdoZEbRyIT6Bl8wnNCRk7UlthLWf1af5Bs/hdbglOXeyfrugNoRNZbu+ve K6oedra3Ss9p/ADCD3fv4vNKJ1x2sNjXk8UGfrCFuaZT7pQkl/USfphp6YQaSoQn1qZZ OJjlYQjkhJvXBlSdRxhmEm7YT/CUd/7rFK/KQcjGeGoFbZTeIJoWsQ6fLUy7H1fnUd8s b6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=YGvf07ikmlKC7GQ2rYlx2E3q6PIVAqLDhOcyEwJlHls1Dd/FfOzeQRiZT3oQZspce+ edTjvlJ3Od0nGiOjWRzrL44x8w9Bd6kMUHkHg9N3fA9uL92kH88z62F8vam2Qga5i9CZ iV10CYyh5sqWM0QWjPEu7OZFQs1USq3TCNpZP/AgRD7PH33Z4mKpnPyPN8hk0zq8+zO3 wMbGu0WFxlmXTfFWQRs/NnXiaj1j36XYUdXbFVDp+oVIl97V70qKO9adk6GgKKr1DGxe Y+EZv0rFqMjSSBDF+ZkRpdYBaRKkfynIap8/ux3HdKDYzlkMPaynHPBacdtzKXW+qqCS Ermg== X-Gm-Message-State: APjAAAX0bDh7KDi+anie+1tMbg/SECyH2UiOz85vr9rcRfmBLRAhndAm eLzZpg+a5gR5kohrZ+aPn1S7g3qg X-Google-Smtp-Source: APXvYqzJ/ySJ+z0VjPKhlTQyMQFU1iuU9BCAPDw4iU0TqindWFDaAlZ0lD4Q/VA3V2aWhbWS1mn+aA== X-Received: by 2002:a05:6000:1111:: with SMTP id z17mr282634wrw.103.1555593650693; Thu, 18 Apr 2019 06:20:50 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id r18sm3417736wme.18.2019.04.18.06.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 06:20:49 -0700 (PDT) Date: Thu, 18 Apr 2019 15:20:47 +0200 From: Ingo Molnar To: Masahiro Yamada Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Message-ID: <20190418132047.GA21430@gmail.com> References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_062052_057249_28757C7C X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , linux-s390@vger.kernel.org, Dave Hansen , Arnd Bergmann , Michael Ellerman , x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Ingo Molnar , linux-mtd@lists.infradead.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org * 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. No objections against moving it from x86 code to generic code. Thanks, Ingo ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E808FC10F0E for ; Thu, 18 Apr 2019 13:21:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B91E7217D7 for ; Thu, 18 Apr 2019 13:21:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Vbequz1l"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBVI3mxB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B91E7217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e5U4/j070NcLmrZRMRZ+RQQiX+91dBjo347bXKNEShQ=; b=Vbequz1lQ/o91E sbIocepbSxbHjTVVf/3aZJFeZZ8VDHdVcndmzW5IUE0rLj9Fv5jZidlXF+eUxk3MkhLzUYqua6HpB j5GReVzhr9cWlcVSNaPXTqMIU6bbr9490VsMWcQ8BRyxbubKxCJesLW1abSsahWLXuTRylRlgTdmG od9fE23fP3+gENtkqqvy1+t6D8LsXcGtgx77Ba+mGs6MKRQ7Oy2LbFtII9EmmKQJF6/3daa7yu2w+ r402dTR/RDZm23F9g0RVSuZZXswE/vgeWWSgyYccclXMZ2u1P7G5t0f3OKsi4tPXlIQoQqKZiybY4 cY4njWi5rAPcTueNczmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH6yF-0008IA-1J; Thu, 18 Apr 2019 13:20:55 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH6yC-0008Hc-0k; Thu, 18 Apr 2019 13:20:53 +0000 Received: by mail-wr1-x444.google.com with SMTP id w18so2928667wrv.11; Thu, 18 Apr 2019 06:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=OBVI3mxBq7hJJ7GMq63UZAs5eDSNSQHVMQhmsRcAzOUlEvQybBl1shmYvk0PdKKK5/ 0AT3aJ9peUWu6DDE2+uo/dmc7PEUAwXzlwkLRi6iJQAHlOzIPupYPzVxLR6BgJ1aoE8/ PaA7Uf6uU6WdoZEbRyIT6Bl8wnNCRk7UlthLWf1af5Bs/hdbglOXeyfrugNoRNZbu+ve K6oedra3Ss9p/ADCD3fv4vNKJ1x2sNjXk8UGfrCFuaZT7pQkl/USfphp6YQaSoQn1qZZ OJjlYQjkhJvXBlSdRxhmEm7YT/CUd/7rFK/KQcjGeGoFbZTeIJoWsQ6fLUy7H1fnUd8s b6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XQCHoAAFT5Z9bDRSYOBbJEBinvShFFVBSkUMOBYi/Tc=; b=YGvf07ikmlKC7GQ2rYlx2E3q6PIVAqLDhOcyEwJlHls1Dd/FfOzeQRiZT3oQZspce+ edTjvlJ3Od0nGiOjWRzrL44x8w9Bd6kMUHkHg9N3fA9uL92kH88z62F8vam2Qga5i9CZ iV10CYyh5sqWM0QWjPEu7OZFQs1USq3TCNpZP/AgRD7PH33Z4mKpnPyPN8hk0zq8+zO3 wMbGu0WFxlmXTfFWQRs/NnXiaj1j36XYUdXbFVDp+oVIl97V70qKO9adk6GgKKr1DGxe Y+EZv0rFqMjSSBDF+ZkRpdYBaRKkfynIap8/ux3HdKDYzlkMPaynHPBacdtzKXW+qqCS Ermg== X-Gm-Message-State: APjAAAX0bDh7KDi+anie+1tMbg/SECyH2UiOz85vr9rcRfmBLRAhndAm eLzZpg+a5gR5kohrZ+aPn1S7g3qg X-Google-Smtp-Source: APXvYqzJ/ySJ+z0VjPKhlTQyMQFU1iuU9BCAPDw4iU0TqindWFDaAlZ0lD4Q/VA3V2aWhbWS1mn+aA== X-Received: by 2002:a05:6000:1111:: with SMTP id z17mr282634wrw.103.1555593650693; Thu, 18 Apr 2019 06:20:50 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id r18sm3417736wme.18.2019.04.18.06.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 06:20:49 -0700 (PDT) Date: Thu, 18 Apr 2019 15:20:47 +0200 From: Ingo Molnar To: Masahiro Yamada Subject: Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Message-ID: <20190418132047.GA21430@gmail.com> References: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1553062828-27798-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_062052_057249_28757C7C X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , linux-s390@vger.kernel.org, Dave Hansen , Arnd Bergmann , Michael Ellerman , x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Ingo Molnar , linux-mtd@lists.infradead.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org * 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. No objections against moving it from x86 code to generic code. Thanks, Ingo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel