netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dvlasenk@redhat.com
Cc: tom@herbertland.com, tgraf@suug.ch, alexander.h.duyck@redhat.com,
	kadlec@blackhole.kfki.hu, herbert@gondor.apana.org.au,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] jhash: Deinline jhash, jhash2 and __jhash_nwords
Date: Sun, 19 Jul 2015 11:40:45 -0700 (PDT)	[thread overview]
Message-ID: <20150719.114045.240943295841151182.davem@davemloft.net> (raw)
In-Reply-To: <55ABBEED.2000707@redhat.com>

From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Sun, 19 Jul 2015 17:14:53 +0200

> On 07/16/2015 08:17 PM, David Miller wrote:
>> From: Tom Herbert <tom@herbertland.com>
>> Date: Thu, 16 Jul 2015 08:43:25 -0700
>> 
>>> On Thu, Jul 16, 2015 at 5:40 AM, Denys Vlasenko <dvlasenk@redhat.com> wrote:
>>>> This patch deinlines jhash, jhash2 and __jhash_nwords.
>>>>
>>>> It also removes rhashtable_jhash2(key, length, seed)
>>>> because it was merely calling jhash2(key, length, seed).
>>>>
>>>> With this .config: http://busybox.net/~vda/kernel_config,
>>>> after deinlining these functions have sizes and callsite counts
>>>> as follows:
>>>>
>>>> __jhash_nwords: 72 bytes, 75 calls
>>>> jhash: 297 bytes, 111 calls
>>>> jhash2: 205 bytes, 136 calls
>>>>
>>> jhash is used in several places in the critical data path. Does the
>>> decrease in text size justify performance impact of not inlining it?
>> 
>> Tom took the words right out of my mouth.
>> 
>> Denys, you keep making deinlining changes like this all the time, like
>> a robot.  But I never see you make any effort to look into the performance
>> nor code generation ramifications of your changes.
> 
> The performance impact of the call/ret pair on modern x86
> CPUs is only 5 cycles. To make a real difference in execution
> speed, the function has to be less than 100 bytes of code.

What performance metrics have you collected to assert that deinlining
doesn't matter?  What networking tests have you done which stress the
socket demux path?

You still aren't addressing any of my concerns.

      reply	other threads:[~2015-07-19 18:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 12:40 [PATCH v2] jhash: Deinline jhash, jhash2 and __jhash_nwords Denys Vlasenko
2015-07-16 14:26 ` Alexander Duyck
2015-07-16 15:43 ` Tom Herbert
2015-07-16 18:17   ` David Miller
2015-07-16 19:23     ` Joe Perches
2015-07-17 13:44       ` Hagen Paul Pfeifer
2015-07-17 22:53         ` Joe Perches
2015-07-19 15:14     ` Denys Vlasenko
2015-07-19 18:40       ` David Miller [this message]

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=20150719.114045.240943295841151182.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexander.h.duyck@redhat.com \
    --cc=dvlasenk@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    --cc=tom@herbertland.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).