Re: ipv6_addr_cmp performance patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <Pine.LNX.4.61.0411091959570.7243@filer.marasystems.com> (at Tue, 9 Nov 2004 20:03:04 +0100 (CET)), Henrik Nordstrom <hno@marasystems.com> says:

> On Tue, 9 Nov 2004, Craig, Dave wrote:
> 
> > Please consider the attached patch for incorporation into the next Linux
> > 2.6 release.  I found that using the __builtin_memcmp GCC intrinsic for
> > doing IPv6 address comparison a lot more slow than integer comparison.
> > In significant SCTP workloads I found address comparison taking roughly
> > 10% of the CPU time.  After changing the address comparison to an
> > integer-based approach the comparison consumed 5% of the CPU time.
> 
> One small comment about your patch: It changes the semantics of 
> ipv6_addr_cmp() from returning sort order A <=> B to boolean A != B. This 
> may be fine, but not if there is users of ipv6_addr_cmp() expecting the 
> sort order property.

There's no such users, AFAIK.
David, I'll do some test. Thanks.

--yoshfuji
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux