netdev
[Top] [All Lists]

Re: [PATCH] Add prefetches in net/ipv4/route.c

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [PATCH] Add prefetches in net/ipv4/route.c
From: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Date: Thu, 28 Jul 2005 23:24:33 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20050728.135826.63129319.davem@xxxxxxxxxxxxx>
References: <42E8FF24.9070009@xxxxxxxxxxxxx> <20050728.123922.126777020.davem@xxxxxxxxxxxxx> <42E94680.8060309@xxxxxxxxxxxxx> <20050728.135826.63129319.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
David S. Miller a écrit :
From: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Date: Thu, 28 Jul 2005 22:56:32 +0200


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

<Prev in Thread] Current Thread [Next in Thread>