Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754788AbbDQRFZ (ORCPT ); Fri, 17 Apr 2015 13:05:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36611 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbbDQRFV (ORCPT ); Fri, 17 Apr 2015 13:05:21 -0400 Message-ID: <55313D4D.4050402@redhat.com> Date: Fri, 17 Apr 2015 19:05:17 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Eric Dumazet CC: David Miller , ebiederm@xmission.com, jengelh@medozas.de, jpirko@redhat.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] netns: deinline net_generic() References: <1429014311-19868-1-git-send-email-dvlasenk@redhat.com> <20150414.143747.1155055158701231768.davem@davemloft.net> <552F9986.30207@redhat.com> <1429187895.7346.195.camel@edumazet-glaptop2.roam.corp.google.com> In-Reply-To: <1429187895.7346.195.camel@edumazet-glaptop2.roam.corp.google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1520 Lines: 49 On 04/16/2015 02:38 PM, Eric Dumazet wrote: > On Thu, 2015-04-16 at 13:14 +0200, Denys Vlasenko wrote: > >> However, without BUG_ONs, function is still a bit big >> on PREEMPT configs. > > Only on allyesconfig builds, that nobody use but to prove some points > about code size. How do you expect one to find excessively large inlines, if not on allyesconfig build? Only by using allyesconfig, I can measure how many calls are there in the kernel. (grepping source is utterly unreliable due to nested inlines and macros). For the record: I am not using the _full_ allyesconfig, I do disable some debugging options which clearly aren't ever enabled on production systems. E.g. in my config: # CONFIG_DEBUG_KMEMLEAK_TEST is not set # CONFIG_KASAN is not set etc. > If you look at net_generic(), it is mostly used from code that is > normally in 3 modules. How many people really load them ? > > net/tipc : 91 call sites > net/sunrpc : 57 > fs/nfsd & fs/lockd : 183 > > Then few remaining uses in tunnels. Grepping is far from reliable. The above missed more than half of all calls. I disassembed vmlinux after deinlining, there are nearly 500 calls of net_generic(). > As we suggested, please just remove the BUG_ON(). Going to send the patch in a minute. -- vda -- 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/