[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160425141941.GI3381@prodigo>
Date: Mon, 25 Apr 2016 22:19:41 +0800
From: Antonio Quartulli <a@...table.cc>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Marek Lindner <mareklindner@...mailbox.ch>,
Simon Wunderlich <sw@...onwunderlich.de>,
Sven Eckelmann <sven@...fation.org>,
b.a.t.m.a.n@...ts.open-mesh.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024
bytes
On Mon, Apr 25, 2016 at 03:45:20PM +0200, Denys Vlasenko wrote:
> 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.
Unfortunately not: this case is rather rare at runtime.
These hash tables are initialized when the batman virtual interface is created
and should be freed only upon interface shutdown.
(actually I believe this might be a good candidate for an unlikely())
Cheers,
--
Antonio Quartulli
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists