diff options
author | Julian Anastasov <ja@ssi.bg> | 2011-03-04 05:20:35 -0500 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-14 20:36:52 -0400 |
commit | 2a0751af09c3099cf2837c623ca5d0436317d02d (patch) | |
tree | c88e052386d8a94c5e239c6abdd1f4b9c86afbef /include/net | |
parent | 2553d064ff4bf999f369c8c3dfacaa797dbef1d9 (diff) |
ipvs: reorganize tot_stats
The global tot_stats contains cpustats field just like the
stats for dest and svc, so better use it to simplify the usage
in estimation_timer. As tot_stats is registered as estimator
we can remove the special ip_vs_read_cpu_stats call for
tot_stats. Fix ip_vs_read_cpu_stats to be called under
stats lock because it is still used as synchronization between
estimation timer and user context (the stats readers).
Also, make sure ip_vs_stats_percpu_show reads properly
the u64 stats from user context.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ip_vs.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 091ca1f76e0e..9db750d9082d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -851,8 +851,7 @@ struct netns_ipvs { | |||
851 | atomic_t conn_count; /* connection counter */ | 851 | atomic_t conn_count; /* connection counter */ |
852 | 852 | ||
853 | /* ip_vs_ctl */ | 853 | /* ip_vs_ctl */ |
854 | struct ip_vs_stats *tot_stats; /* Statistics & est. */ | 854 | struct ip_vs_stats tot_stats; /* Statistics & est. */ |
855 | struct ip_vs_cpu_stats __percpu *cpustats; /* Stats per cpu */ | ||
856 | seqcount_t *ustats_seq; /* u64 read retry */ | 855 | seqcount_t *ustats_seq; /* u64 read retry */ |
857 | 856 | ||
858 | int num_services; /* no of virtual services */ | 857 | int num_services; /* no of virtual services */ |