From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497AbcDJQ7K (ORCPT ); Sun, 10 Apr 2016 12:59:10 -0400 Received: from smtprelay0208.hostedemail.com ([216.40.44.208]:43375 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751712AbcDJQ7I (ORCPT ); Sun, 10 Apr 2016 12:59:08 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:4250:4321:5007:6119:7903:8603:10004:10400:10848:11026:11232:11658:11783:11914:12043:12438:12517:12519:12555:12740:13069:13071:13095:13311:13357:13439:13894:14180:14181:14659:14721:21080:30054:30064:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: act64_4f75eb912b40c X-Filterd-Recvd-Size: 2571 Message-ID: <1460307544.1800.53.camel@perches.com> Subject: Re: [PATCH] Bluetooth: Deinline large functions From: Joe Perches To: Denys Vlasenko , Johan Hedberg Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 10 Apr 2016 09:59:04 -0700 In-Reply-To: <1460305444-14159-1-git-send-email-dvlasenk@redhat.com> References: <1460305444-14159-1-git-send-email-dvlasenk@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2016-04-10 at 18:24 +0200, Denys Vlasenko wrote: > Fastest existing Bluetooth standard's top speed is 2.4 MB/s. > It is way off from being CPU limited, no need to squeeze > last few cycles by excessive inlining. > > This patch delinlines the following functions: > > hci_conn_hash_lookup_handle: 345 bytes, 39 calls > hci_conn_hash_lookup_ba: 372 bytes, 36 calls > hci_conn_hash_lookup_le: 382 bytes, 8 calls > hci_conn_hash_lookup_state: 356 bytes, 3 calls > hci_lookup_le_connect: 378 bytes, 7 calls > hci_conn_drop: 186 bytes, 30 calls > hci_connect_cfm: 121 bytes, 15 calls > hci_disconn_cfm: 121 bytes, 2 calls > hci_auth_cfm: 156 bytes, 2 calls > hci_encrypt_cfm: 156 bytes, 3 calls > > Size reduction is about 40k: > >     text     data      bss       dec     hex filename > 95943139 20860256 35991552 152794947 91b7743 vmlinux_before > 95903714 20860256 35991552 152755522 91add42 vmlinux Hello Denys While removing unnecessary inlines is generally a good thing, for extremely low power embedded systems like a coin-battery operated bicycle computer or a heart rate monitor, this might cause a throughput reduction. Also, the size decrease for a defconfig should be quite a bit smaller than this. Can you please also show the size decrease when done with a defconfig with bluetooth support? And for these types of patches in general, please add a defconfig size reduction to the commit message. This is an x86-64 defconfig with bluetooth with and without this patch: $ size vmlinux.defconfig.*    text    data     bss     dec     hex filename 10214414 4313816 1097728 15625958  ee6ee6 vmlinux.defconfig.new 10224014 4313816 1097728 15635558  ee9466 vmlinux.defconfig.old ~10k total