cacheline align rt_cache_stat struct
PATCH 1/1 cacheline align rt_cache_stat struct
The per-cpu rt_cache_stat structure should be padded to cacheline to avoid sharing of cachelines between different CPUs. Here is a patch to do that for SMP kernels.
Thanks
Dipankar
Signature · 15 lines
Dipankar Sarma <[email protected]> Project: http://lse.sourceforge.net Linux Technology Center, IBM Software Lab, Bangalore, India. diff -urN linux-2.4.10/include/net/route.h linux-2.4.10+rt/include/net/route.h --- linux-2.4.10/include/net/route.h Thu Sep 27 11:59:45 2001 +++ linux-2.4.10+rt/include/net/route.h Tue Oct 2 18:34:45 2001 @@ -105,7 +105,7 @@ unsigned int out_hit; unsigned int out_slow_tot; unsigned int out_slow_mc; -}; +} ____cacheline_aligned_in_smp; extern struct ip_rt_acct *ip_rt_acct;
Thanks, I've added your change to my tree.
Franks a lot,
David S. Miller
[email protected]