Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754674AbcDYNpZ (ORCPT ); Mon, 25 Apr 2016 09:45:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40346 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754575AbcDYNpX (ORCPT ); Mon, 25 Apr 2016 09:45:23 -0400 Message-ID: <571E1F70.3040001@redhat.com> Date: Mon, 25 Apr 2016 15:45:20 +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: Antonio Quartulli CC: Marek Lindner , Simon Wunderlich , Sven Eckelmann , b.a.t.m.a.n@lists.open-mesh.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes References: <1461590722-2095-1-git-send-email-dvlasenk@redhat.com> <20160425133950.GH3381@prodigo> In-Reply-To: <20160425133950.GH3381@prodigo> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 25 Apr 2016 13:45:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 657 Lines: 22 On 04/25/2016 03:39 PM, Antonio Quartulli wrote: > On Mon, Apr 25, 2016 at 03:25:22PM +0200, Denys Vlasenko wrote: >> This function compiles to 473 bytes of machine code. >> 21 callsites. >> >> text data bss dec hex filename >> 95903266 20860288 35991552 152755106 91adba2 vmlinux_before >> 95894242 20860288 35991552 152746082 91ab862 vmlinux > > Hi Danys, > > thanks for your patch. This function is used in a several performance critical > code paths (i.e. packet forwarding). > > Are we sure we are not losing in performance here? Is this a common case? if (!hash) return NULL; If yes, then we can inline this part only.