Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344907
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | zhao ya <marywangran0627@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] IPIP tunnel performance improvement |
| Date | Sat, 27 Feb 2016 06:00:02 +0100 |
| Message-ID | <r6F90-600-3@gated-at.bofh.it> (permalink) |
| References | <r6EZk-5W5-3@gated-at.bofh.it> <r6EZk-5W5-1@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=tN+QDULqN7TVe2piRnAEh7bQCFLaeVDteM1vkvNMd4Y=; b=Jio9HDTv1M42rPsz4wnQTXLRpDmKj+M6EL0lVJqmAmNusRcuWekpaNLJ2xN+iLDuqn D0+p9OmrWOoU3/cxyj0ZkGFh9TvuLDHNbAvNMwWBuxAchqwdUtDFUaGUhRtdqEgFxuf1 lXJ1/+FtMbFwbzldpLWBtp5Nzg/doTlHuMKrQ3IguWUt6TTyFcE18iA3TUTOWpGqGnZt 1fDoe/7PYcMD+TCDlVxCgoqWUEMxN351yqz5P2cEzlyMWN4huUXjusW/hB4G9hli7vMx 1DetO8V0GI0eQqmarTTTJGtgyBEunpxCwXPgaJ+W+9w8lF+9Yzt17Qv7mlhed8k09E2S xBug== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tN+QDULqN7TVe2piRnAEh7bQCFLaeVDteM1vkvNMd4Y=; b=D/QZqKwNsP7WgY8cbbBh/RK8wtn5ecevs7/BbsB1uJWiOIZ38mkuCyVaeVAIDrvIWd NF7b0U7jiv3ZOMdN4pnqQ6q46etdCQOvEfbQFPFFSwAqZJGFL/uBjJutA2rvFUoto0bA dsP04fqDXY/s9Oy0JEPBICe80Ei9rS5vAtKo0NlW1Vx7y4HH8MOpP1Oned2cDzS8FugX f0OiCzZxY7EDhtfZeomFtfLZLdYgwem5YmPbHGBtKqX67Q0lXZ6qNojP34cO9g77Lxba sDZmozXr9ee2uyAffbgiUA+o/STSydixWA4/HzXZ6Xb2JoLqwx2YxGS7ow/3u535AUMF B5NQ== |
| X-Gm-Message-State | AD7BkJLYg/rfEepGVkYjGJV4BbfGAdhQQ7hOLYdsAsesjPGxT40Vcu8k9+ipnOvXRws2qg== |
| X-Received | by 10.194.112.98 with SMTP id ip2mr4808868wjb.24.1456548729522; Fri, 26 Feb 2016 20:52:09 -0800 (PST) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 66 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, netdev@vger.kernel.org |
| X-Original-Date | Sat, 27 Feb 2016 12:52:02 +0800 |
| X-Original-Message-ID | <56D12B72.6030804@gmail.com> |
| X-Original-References | <56D12752.7080303@gmail.com> <56D128D7.3090009@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1344907 |
Show key headers only | View raw
BTW,before the version 3.5 kernel, the source code contains the logic. 2.6.32, for example, in arp_bind_neighbour function, there are the following logic: __be32 nexthop = ((struct rtable *) DST) - > rt_gateway; if (dev - > flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) nexthop = 0; n = __neigh_lookup_errno ( ... zhao ya said, at 2/27/2016 12:40 PM: > From: Zhao Ya <marywangran0627@gmail.com> > Date: Sat, 27 Feb 2016 10:06:44 +0800 > Subject: [PATCH] IPIP tunnel performance improvement > > bypass the logic of each packet's own neighbour creation when using > pointopint or loopback device. > > Recently, in our tests, met a performance problem. > In a large number of packets with different target IP address through > ipip tunnel, PPS will decrease sharply. > > The output of perf top are as follows, __write_lock_failed is of the first: > - 5.89% [kernel] [k] __write_lock_failed > -__write_lock_failed a > -_raw_write_lock_bh a > -__neigh_create a > -ip_finish_output a > -ip_output a > -ip_local_out a > > The neighbour subsystem will create a neighbour object for each target > when using pointopint device. When massive amounts of packets with diff- > erent target IP address to be xmit through a pointopint device, these > packets will suffer the bottleneck at write_lock_bh(&tbl->lock) after > creating the neighbour object and then inserting it into a hash-table > at the same time. > > This patch correct it. Only one or little amounts of neighbour objects > will be created when massive amounts of packets with different target IP > address through ipip tunnel. > > As the result, performance will be improved. > > > Signed-off-by: Zhao Ya <marywangran0627@gmail.com> > Signed-off-by: Zhaoya <gaiuszhao@tencent.com> > --- > net/ipv4/ip_output.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > index 64878ef..d7c0594 100644 > --- a/net/ipv4/ip_output.c > +++ b/net/ipv4/ip_output.c > @@ -202,6 +202,8 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s > > rcu_read_lock_bh(); > nexthop = (__force u32) rt_nexthop(rt, ip_hdr(skb)->daddr); > + if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) > + nexthop = 0; > neigh = __ipv4_neigh_lookup_noref(dev, nexthop); > if (unlikely(!neigh)) > neigh = __neigh_create(&arp_tbl, &nexthop, dev, false); > >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] IPIP tunnel performance improvement zhao ya <marywangran0627@gmail.com> - 2016-02-27 05:50 +0100
Re: [PATCH] IPIP tunnel performance improvement zhao ya <marywangran0627@gmail.com> - 2016-02-27 06:00 +0100
Re: [PATCH] IPIP tunnel performance improvement Cong Wang <xiyou.wangcong@gmail.com> - 2016-02-27 07:40 +0100
Re: [PATCH] IPIP tunnel performance improvement zhao ya <marywangran0627@gmail.com> - 2016-02-27 08:10 +0100
csiph-web