[Devel] [PATCH rh7 v2] ve/vznetstat: Don't destroy statistics until explicitly asked
Cyrill Gorcunov
gorcunov at virtuozzo.com
Fri Jul 24 08:10:10 PDT 2015
When I've been reworking vznetstat mem management I've added destroying
of VE's statistics upon containers stop. This is incorrect, we need to
keep it while module is alive.
Still one can destroy statistics with VZCTL_TC_DESTROY_STAT
or VZCTL_TC_DESTROY_ALL_STAT (of course it clears it for
non running VEs only).
https://jira.sw.ru/browse/PSBM-35178
v2 (by vdavydov@):
- clear ve::stat in net_exit_acct instead of bunch
cleanup on module exit
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
CC: Andrey Vagin <avagin at virtuozzo.com>
CC: Vladimir Davydov <vdavydov at virtuozzo.com>
CC: Konstantin Khorenko <khorenko at virtuozzo.com>
CC: Pavel Emelyanov <xemul at virtuozzo.com>
CC: Igor Sukhih <igor at parallels.com>
---
kernel/ve/vznetstat/vznetstat.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: linux-pcs7.git/kernel/ve/vznetstat/vznetstat.c
===================================================================
--- linux-pcs7.git.orig/kernel/ve/vznetstat/vznetstat.c
+++ linux-pcs7.git/kernel/ve/vznetstat/vznetstat.c
@@ -1098,10 +1098,8 @@ static void __net_exit net_exit_acct(str
if (ve->stat) {
venet_acct_put_stat(ve->stat);
- if (atomic_read(&ve->stat->users) == 0) {
- venet_acct_destroy_stat(ve->veid);
+ if (atomic_read(&ve->stat->users) == 0)
ve->stat = NULL;
- }
}
}
More information about the Devel
mailing list