Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1386516

Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes

From Antonio Quartulli <a@unstable.cc>
Newsgroups linux.kernel
Subject Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes
Date 2016-04-25 16:30 +0200
Message-ID <rrPGq-7oh-35@gated-at.bofh.it> (permalink)
References <rrOKl-6zz-1@gated-at.bofh.it> <rrP3K-6Kr-37@gated-at.bofh.it> <rrP3K-6Kr-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-25 15:30 +0200
  Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024  bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-25 15:50 +0200
    Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024  bytes Antonio Quartulli <a@unstable.cc> - 2016-04-25 16:30 +0200
  Re: [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024  bytes Antonio Quartulli <a@unstable.cc> - 2016-04-25 16:10 +0200

csiph-web