]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: Embed estimator object into stats object
authorSven Wegener <sven.wegener@stealer.net>
Sun, 10 Aug 2008 18:24:41 +0000 (18:24 +0000)
committerSven Wegener <sven.wegener@stealer.net>
Mon, 11 Aug 2008 12:00:43 +0000 (14:00 +0200)
commit3d6b2eb429b8152ead3706fb56512e343bf27ca4
tree86dbebf182b9f8dc66cfce4e3defb79fb9e279cb
parentb9eaaf302daa1a722fb9bac73062621f0379ae7c
ipvs: Embed estimator object into stats object

There's no reason for dynamically allocating an estimator object for every
stats object. Directly embed an estimator object into every stats object and
switch to using the kernel-provided list implementation. This makes the code
much simpler and faster, as we do not need to traverse the list of all
estimators to find the one belonging to a stats object. There's no need to use
an rwlock, as we only have one reader. Also reorder the members of the
estimator structure slightly to avoid padding overhead. This can't be done
with the stats object as the members are currently copied to our user space
object via memcpy() and changing it would break ABI.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
include/net/ip_vs.h
net/ipv4/ipvs/ip_vs_ctl.c
net/ipv4/ipvs/ip_vs_est.c