Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934083AbbEMKnN (ORCPT ); Wed, 13 May 2015 06:43:13 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:38622 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565AbbEMKnK (ORCPT ); Wed, 13 May 2015 06:43:10 -0400 Date: Wed, 13 May 2015 12:43:05 +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: <20150513104305.GB5113@gmail.com> References: <1431367042-31475-1-git-send-email-dvlasenk@redhat.com> <20150512074443.GA724@gmail.com> <5551DDBD.9010803@redhat.com> <20150512114353.GA13699@gmail.com> <5551FC76.40000@redhat.com> <20150513101744.GA4318@gmail.com> <5553273B.6020405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5553273B.6020405@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: 2416 Lines: 67 * Denys Vlasenko wrote: > On 05/13/2015 12:17 PM, Ingo Molnar wrote: > >>> In any case, the interesting measurement would not be -Os comparisons > >>> (which causes GCC to be too crazy), but to see the size effect of your > >>> _patch_ that always-inlines spinlock ops, on plain defconfig and on > >>> defconfig-Os. > >> > >> Here it is: > >> > >> text data bss dec hex filename > >> 12335864 1746152 1081344 15163360 e75fe0 vmlinuxO2.before > >> 12335930 1746152 1081344 15163426 e76022 vmlinux > > > > Hm, that's a (small) size increase on O2. > > > > That might be a net positive though: because now we've eliminated > > quite a few function calls. Do we know which individual functions > > bloat and which debloat? > > >> text data bss dec hex filename > >> 10373764 1684200 1077248 13135212 c86d6c vmlinuxOs.before > >> 10363621 1684200 1077248 13125069 c845cd vmlinux > > > > A decrease - which gets exploded on allyesconfig. > > > > So as long as the -O2 case does not get hurt we can do -Os fixes. > > > > I think this needs a bit more work to ensure that the O2 case is a > > net win. > > I think O2 difference is just noise: with -O2 gcc is far less prone > to bogus deinlining, my patch should have negligible effect. And > effect is indeed negligible: +70 bytes on 12 megabytes. So the patch force-inlines about a dozen locking APIs: - Some of those decrease the defconfig kernel size. Which ones and by how much? - Some of those increase the defconfig kernel size. Which ones and by how much? We only know that the net effect is +70 bytes. Does that come out of: - large fluctuations such as -1000-1000+1000+1070, which happens to net out into a small net number? - or does it come from much smaller fluctuations? So to make an informed decision we need to know those details. When I deinline or reinline functions I usually do it on a per function basis, to avoid such ambiguity. In the end what we want to have is only those deinlining/reinlining changes that decrease the defconfig kernel size, or at worst only increase it marginally. 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/