Re: [PATCH] Add prefetches in net/ipv4/route.c
From: Eric Dumazet <hidden>
Date: 2005-07-28 20:56:32
David S. Miller a écrit :
From: Eric Dumazet <redacted> Date: Thu, 28 Jul 2005 17:52:04 +0200quoted
[NET] : Adds prefetches in route hash list traversals. The actual code doesnt use a prefetch enabled macro like list_for_each_rcu(), so manually add prefetch() hints.and the measured performance improvement is?
Half the improvement we could get if only fl.fl4_dst, and other fields were not so far away from the u.rt_next field. (0xE8 on x86_64) For good performance, one should of course choose a big route cache hash size, and in this case, prefetchs are useless, and even cost an extra load : prefetch(rth->u.rt_next) imply the load of the rt_next pointer at the start of rth structure, while the fl fields are on a different cache line) But in case of DDOS, prefetches are a win. I did not test a solution using two prefetches... Other patches using prefetches will follow. Eric