diff options
author | Julian Anastasov <ja@ssi.bg> | 2011-03-13 19:41:54 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-14 20:36:53 -0400 |
commit | ea9f22cce9c2530d659f9122819940b69506b2d9 (patch) | |
tree | 854e130b123d63f6a167f1deb72d15601d907c40 /include/net/ip_vs.h | |
parent | 87d68a15e2d5a6bd08e59ec80c7a5073bcabb7c3 (diff) |
ipvs: optimize rates reading
Move the estimator reading from estimation_timer to user
context. ip_vs_read_estimator() will be used to decode the rate
values. As the decoded rates are not set by estimation timer
there is no need to reset them in ip_vs_zero_stats.
There is no need ip_vs_new_estimator() to encode stats
to rates, if the destination is in trash both the stats and the
rates are inactive.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index cf014abc23fd..e4a39c4e263b 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -1179,6 +1179,8 @@ extern void ip_vs_estimator_cleanup(void); | |||
1179 | extern void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats); | 1179 | extern void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats); |
1180 | extern void ip_vs_kill_estimator(struct net *net, struct ip_vs_stats *stats); | 1180 | extern void ip_vs_kill_estimator(struct net *net, struct ip_vs_stats *stats); |
1181 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); | 1181 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); |
1182 | extern void ip_vs_read_estimator(struct ip_vs_stats_user *dst, | ||
1183 | struct ip_vs_stats *stats); | ||
1182 | 1184 | ||
1183 | /* | 1185 | /* |
1184 | * Various IPVS packet transmitters (from ip_vs_xmit.c) | 1186 | * Various IPVS packet transmitters (from ip_vs_xmit.c) |