[Devel] [PATCH RHEL7 COMMIT] ve/kstat/alloc_lat: Initialize alloc_lat to zero at start

2018-02-19 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.43.7
-->
commit 1d8faed7b3fc2a21686259156975a69cd2018a5b
Author: Andrey Ryabinin 
Date:   Mon Feb 19 19:22:22 2018 +0300

ve/kstat/alloc_lat: Initialize alloc_lat to zero at start

It seems that 'struct task_struct' not initialized to zero after
allocation. Thus we need to initialize alloc_lat explicitly.

https://jira.sw.ru/browse/PSBM-81395
Signed-off-by: Andrey Ryabinin 
Reviewed-by: Kirill Tkhai 
---
 kernel/fork.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 645b489e33e0..112bef1e2695 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -373,6 +373,10 @@ static struct task_struct *dup_task_struct(struct 
task_struct *orig, int node)
tsk->stack_canary = get_random_int();
 #endif
 
+#ifdef CONFIG_VE
+   memset(tsk->alloc_lat, 0, sizeof(tsk->alloc_lat));
+#endif
+
/*
 * One for us, one for whoever does the "release_task()" (usually
 * parent)
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


[Devel] [PATCH RHEL7 COMMIT] ve/kstat/alloc_lat: Initialize alloc_lat to zero at start

2018-02-19 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.45.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.45.3
-->
commit 82ddc4c43f2d97c5c0d009072e5b06acf3f3a241
Author: Andrey Ryabinin 
Date:   Mon Feb 19 19:19:10 2018 +0300

ve/kstat/alloc_lat: Initialize alloc_lat to zero at start

It seems that 'struct task_struct' not initialized to zero after
allocation. Thus we need to initialize alloc_lat explicitly.

https://jira.sw.ru/browse/PSBM-81395
Signed-off-by: Andrey Ryabinin 
Reviewed-by: Kirill Tkhai 
---
 kernel/fork.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 645b489e33e0..112bef1e2695 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -373,6 +373,10 @@ static struct task_struct *dup_task_struct(struct 
task_struct *orig, int node)
tsk->stack_canary = get_random_int();
 #endif
 
+#ifdef CONFIG_VE
+   memset(tsk->alloc_lat, 0, sizeof(tsk->alloc_lat));
+#endif
+
/*
 * One for us, one for whoever does the "release_task()" (usually
 * parent)
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel