Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932236AbbELHow (ORCPT ); Tue, 12 May 2015 03:44:52 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35820 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932131AbbELHot (ORCPT ); Tue, 12 May 2015 03:44:49 -0400 Date: Tue, 12 May 2015 09:44:43 +0200 From: Ingo Molnar To: Denys Vlasenko Cc: Linus Torvalds , Thomas Graf , "David S. Miller" , Bart Van Assche , Peter Zijlstra , David Rientjes , Andrew Morton , Oleg Nesterov , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] force inlining of spinlock ops Message-ID: <20150512074443.GA724@gmail.com> References: <1431367042-31475-1-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431367042-31475-1-git-send-email-dvlasenk@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: 1031 Lines: 30 * Denys Vlasenko wrote: > With both gcc 4.7.2 and 4.9.2, sometimes gcc mysteriously doesn't inline > very small functions we expect to be inlined. In particular, > with this config: http://busybox.net/~vda/kernel_config > there are more than a thousand copies of tiny spinlock-related functions: That's an x86-64 allyesconfig AFAICS, right? It's not mysterious, but an effect of -Os plus allowing GCC to do inlining heuristics: CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_OPTIMIZE_INLINING=y Does the problem go away if you unset of these config options? Furtermore, what is the size win on x86 defconfig with these options set? allyesconfig has all sorts of crazy stuff enabled while defconfig on x86 tries to track typical distro configs. 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/