[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 03103) Re: ipv6_addr_cmp performance patch
In article <Pine.LNX.4.61.0411091959570.7243@xxxxxxxxxxxxxxxxxxxxx> (at Tue, 9 Nov 2004 20:03:04 +0100 (CET)), Henrik Nordstrom <hno@xxxxxxxxxxxxxxx> 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