From: Jesper Dangaard Brouer <brouer@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
brouer@redhat.com, xiyou.wangcong@gmail.com
Subject: Re: [net-next PATCH] net: reduce cycles spend on ICMP replies that gets rate limited
Date: Sat, 7 Jan 2017 11:31:33 +0100 [thread overview]
Message-ID: <20170107113133.227f3c29@redhat.com> (raw)
In-Reply-To: <20170106.221042.1641025960219244932.davem@davemloft.net>
On Fri, 06 Jan 2017 22:10:42 -0500 (EST)
David Miller <davem@davemloft.net> wrote:
> BTW Eric, you asked about kmalloc() allocation, you were CC:'d in the
> patch which did this :-)
>
> commit 9a99d4a50cb8ce516adf0f2436138d4c8e6e4535
> Author: Cong Wang <amwang@redhat.com>
> Date: Sun Jun 2 15:00:52 2013 +0000
>
> icmp: avoid allocating large struct on stack
>
> struct icmp_bxm is a large struct, reduce stack usage
> by allocating it on heap.
>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Did a quick revert, and tested again. It is not the major bottleneck,
but we do save something. The major bottleneck is still the call to
__ip_route_output_key_hash (invoked by icmp_route_lookup).
Single flow improvement from 1719182 pps to 1783368 pps.
- 64186 pps
- (1/1783368-1/1719182)*10^9 = -20.93 nanosec
* 4GHz approx = 20.93*4 = 83.72 cycles
The optimal SLUB fast-path on this machine is 54 cycles(tsc) 13.557 ns,
thus the saving is actually higher than expected. But low compared to
avoiding the icmp_route_lookup.
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2017-01-07 10:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 17:39 [net-next PATCH] net: reduce cycles spend on ICMP replies that gets rate limited Jesper Dangaard Brouer
2017-01-06 19:40 ` Eric Dumazet
2017-01-06 22:08 ` Eric Dumazet
2017-01-07 3:10 ` David Miller
2017-01-07 10:31 ` Jesper Dangaard Brouer [this message]
2017-01-07 9:28 ` Jesper Dangaard Brouer
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=20170107113133.227f3c29@redhat.com \
--to=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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 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.