Re: [PATCH] Add prefetches in net/ipv4/route.c
From: Eric Dumazet <hidden>
Date: 2005-07-28 21:24:33
David S. Miller a écrit :
From: Eric Dumazet <redacted> Date: Thu, 28 Jul 2005 22:56:32 +0200quoted
But in case of DDOS, prefetches are a win.Numbers please, I'm simply curious.
I have no profiling info for this exact patch, I'm sorry David.
On a dual opteron machine, this thing from ip_route_input() is very expensive :
RT_CACHE_STAT_INC(in_hlist_search);
ip_route_input() use a total of 3.4563 % of one cpu, but this 'increment' takes 1.20 % !!!
0.0047 mov 2123529(%rip),%rax # ffffffff804b4a60 <rt_cache_stat>
1.1898 not %rax
mov %gs:0x34,%edx
0.0042 movslq %edx,%rdx
mov (%rax,%rdx,8),%rax
incl 0x38(%rax)
Sometime I wonder if oprofile can be trusted :(
Maybe we should increment a counter on the stack and do a final
if (counter != 0)
RT_CACHE_STAT_ADD(in_hlist_search, counter);
Eric