Make rt_cache_stat use kmalloc_percpu
Subsystems (3)
PATCH 1/1 Make rt_cache_stat use kmalloc_percpu
Hi,
Here's another patch to use kmalloc_percpu. As usual, this removes NR_CPUS bloat, can work when modulized and helps node local allocation.
Thanks,
Kiran
D: Name: rtstats-2.5.52-1.patch
D: Author: Ravikiran Thirumalai
D: Description: Make rt_cache_stat use kmalloc_percpu
include/net/route.h | 6 +++- net/ipv4/route.c | 71 +++++++++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 32 deletions(-)
include/net/route.h +5 -1
@@ -102,7 +102,11 @@unsigned int gc_ignored;unsigned int gc_goal_miss;unsigned int gc_dst_overflow; -}____cacheline_aligned_in_smp ; +}; + +extern struct rt_cache_stat *rt_cache_stat; +#define RT_CACHE_STAT_INC (field) \ + (per_cpu_ptr(rt_cache_stat, smp_processor_id())->field++)extern struct ip_rt_acct *ip_rt_acct;
net/ipv4/route.c +40 -31
178 lines not on this page · raw message
From: Ravikiran G Thirumalai <[email protected]>
Date: Mon, 16 Dec 2002 19:22:12 +0530
Here's another patch to use kmalloc_percpu. As usual, this removes NR_CPUS bloat, can work when modulized and helps node local allocation.
I can't consider this seriously until the kmalloc_percpu stuff actually makes it into Linus's tree. Last I checked, Andrew had a lot of legitimate gripes with the ideas.
Quoted 10 lines · David S. Miller
From: Ravikiran G Thirumalai <[email protected]>
Date: Mon, 16 Dec 2002 19:22:12 +0530Here's another patch to use
kmalloc_percpu. As usual, this removesNR_CPUSbloat, can work when modulized and helps node local allocation.I can't consider this seriously until the
kmalloc_percpustuff actually makes it into Linus's tree. Last I checked, Andrew had a lot of legitimate gripes with the ideas.
Kiran's latest (vastly simpler) version looks fine to my eye.
From: Andrew Morton <[email protected]>
Date: Fri, 20 Dec 2002 23:31:56 -0800
Quoted 3 lines · David S. Miller
I can't consider this seriously until the
kmalloc_percpustuff actually makes it into Linus's tree. Last I checked, Andrew had a lot of legitimate gripes with the ideas.
Kiran's latest (vastly simpler) version looks fine to my eye.
Ok, so once that is in, he can feel free to resubmit the rt_cache_state patch.
Quoted 5 lines · David S. Miller
...
Kiran's latest (vastly simpler) version looks fine to my eye.Ok, so once that is in, he can feel free to resubmit the
rt_cache_statepatch.
Ok, I'll do that
Thanks,
Kiran