netdev
[Top] [All Lists]

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

To: Robert.Olsson@xxxxxxxxxxx
Subject: Re: [PATCH] Add prefetches in net/ipv4/route.c
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Sat, 30 Jul 2005 20:44:48 -0700 (PDT)
Cc: dada1@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <17130.16951.581026.863431@xxxxxxxxxxxx>
References: <20050728.135826.63129319.davem@xxxxxxxxxxxxx> <42E94D11.4090002@xxxxxxxxxxxxx> <17130.16951.581026.863431@xxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
Date: Fri, 29 Jul 2005 16:50:31 +0200

>  My experiences from playing with prefetching eth_type_trans in this 
>  case. One must look in the total performance not just were the 
>  prefetching is done. In this case I was able to get eth_type_trans
>  down in the profile list but other functions increased so performance
>  was the same or lower. This needs to be sorted out... 

The problem is that if you just barely fit in the cache for a
workload, prefetches can hurt if done too early.  Let's say that your
code path needs to access data items A, B, and C, in that order.  If
you need to access A in order to know C, and subsequently if you
prefetch C before you use B, you might kick out B and end up making
performance worse (since you'll thus need to bring in C twice).

I really do not want to merge in any prefetch patches until
there is hard data showing an improvement, instead of some
shamanistic justification :-)

When the witch doctor comes to town and starts adding prefetches
all over the place without performance metrics, I become rightly
concerned.

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