Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965186AbbENToW (ORCPT ); Thu, 14 May 2015 15:44:22 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:34534 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964969AbbENToU (ORCPT ); Thu, 14 May 2015 15:44:20 -0400 Date: Thu, 14 May 2015 21:44:15 +0200 From: Ingo Molnar To: Denys Vlasenko Cc: "Paul E. McKenney" , Linus Torvalds , Jason Low , Peter Zijlstra , Davidlohr Bueso , Tim Chen , Aswin Chandramouleeswaran , LKML , Borislav Petkov , Andy Lutomirski , Brian Gerst , "H. Peter Anvin" , Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH] x86: Align jump targets to 1 byte boundaries Message-ID: <20150514194415.GA27518@gmail.com> References: <20150409183926.GM6464@linux.vnet.ibm.com> <20150410090051.GA28549@gmail.com> <20150410091252.GA27630@gmail.com> <20150410092152.GA21332@gmail.com> <20150410111427.GA30477@gmail.com> <20150410112748.GB30477@gmail.com> <20150410120846.GA17101@gmail.com> <55548E12.6020207@redhat.com> <20150514181707.GA21728@gmail.com> <5554F1C4.5060802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5554F1C4.5060802@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1530 Lines: 48 * Denys Vlasenko wrote: > On 05/14/2015 08:17 PM, Ingo Molnar wrote: > > There were also these other changes I tested: > > > > + # Reduces vmlinux size by 0.25%: > > + KBUILD_CFLAGS += -fno-caller-saves > > + > > + # Reduces vmlinux size by 1.10%: > > + KBUILD_CFLAGS += -fno-inline-small-functions > > + > > + # Reduces vmlinux size by about 0.95%: > > + KBUILD_CFLAGS += -fno-tree-ch > > > > We could maybe consider -fno-caller-saves. What do you think about > > that option? > > Quick googling din't even find what it does. > It would need a comment :) The GCC manpage says: -fcaller-saves Enable allocation of values to registers that are clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls. Such allocation is done only when it seems to result in better code. This option is always enabled by default on certain machines, usually those which have no call-preserved registers to use instead. Enabled at levels -O2, -O3, -Os. but I have not checked the disassembly. 0.25% defconfig reduction still seems significant. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/