lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <539F6223.4040006@fb.com>
Date:	Mon, 16 Jun 2014 17:31:15 -0400
From:	Chris Mason <clm@...com>
To:	<netdev@...r.kernel.org>
Subject: perf regression from ipv6: use net->rt_genid to check dst validity

Hi everyone,

I tracked down a perf regression last week in our 3.10-stable based
kernel.  fib6_lookup_1 was at the top of the profiles, being called very
frequently during sends.  The 2.6.38 kernel we were comparing
against only called fib6_lookup_1 during recv.

The call chain was doing the lookups because we were always tossing the
destination cache.  A little trial and error led me to this commit:

	commit 6f3118b571b8a4c06c7985dc3172c3526cb86253
	Author: Nicolas Dichtel <nicolas.dichtel@...nd.com>
	Date:   Mon Sep 10 22:09:46 2012 +0000

	    ipv6: use net->rt_genid to check dst validity

The workload was our in memory database, and dropping this commit gave
us a 10% boost to overall queries per second.

Moving up to mainline, it looks like we're still failing the validity
check most of the time.  A few printks show when we do fail, it's always
this line:

       if (rt->rt6i_genid != rt_genid_ipv6(dev_net(rt->dst.dev)))

The cached dst had a genid of 2 and the dev_net version was 3.

What I haven't done yet is fully reproduce the 10% hit on mainline.  I
have a few patches to port in and I'll get a workload running on 3.15.
But it doesn't look like this part has changed.  Somehow we're hanging
onto a destination cache with an old genid and we're hammering on lookups
because of it.

Any ideas before I shower things with printk?

-chris

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ