All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <a@unstable.cc>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: linux-kernel@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes
Date: Mon, 25 Apr 2016 22:19:41 +0800	[thread overview]
Message-ID: <20160425141941.GI3381@prodigo> (raw)
In-Reply-To: <571E1F70.3040001@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1088 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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Antonio Quartulli <a@unstable.cc>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Marek Lindner <mareklindner@neomailbox.ch>,
	Simon Wunderlich <sw@simonwunderlich.de>,
	Sven Eckelmann <sven@narfation.org>,
	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
Date: Mon, 25 Apr 2016 22:19:41 +0800	[thread overview]
Message-ID: <20160425141941.GI3381@prodigo> (raw)
In-Reply-To: <571E1F70.3040001@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1088 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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-25 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 13:25 [B.A.T.M.A.N.] [PATCH] batman-adv: Deinline batadv_orig_hash_find, save 9024 bytes Denys Vlasenko
2016-04-25 13:25 ` Denys Vlasenko
2016-04-25 13:39 ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-04-25 13:39   ` Antonio Quartulli
2016-04-25 13:45   ` [B.A.T.M.A.N.] " Denys Vlasenko
2016-04-25 13:45     ` Denys Vlasenko
2016-04-25 14:19     ` Antonio Quartulli [this message]
2016-04-25 14:19       ` Antonio Quartulli
2017-10-23 16:41   ` [B.A.T.M.A.N.] " Sven Eckelmann
2017-10-23 16:41     ` Sven Eckelmann
2016-04-29 21:15 ` [B.A.T.M.A.N.] " Sven Eckelmann
2016-04-29 21:15   ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160425141941.GI3381@prodigo \
    --to=a@unstable.cc \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mareklindner@neomailbox.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.