[Devel] [PATCH rh8 4/5] ve/time: Add comment in ve_start_container() on start time initialization
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Oct 8 18:22:02 MSK 2020
Fixes: e931118f8139 ("ve: Add ve cgroup and ve_hook subsys")
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
kernel/ve/ve.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 1688407562d4..ac2252445841 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -398,6 +398,11 @@ static int ve_start_container(struct ve_struct *ve)
if (task_active_pid_ns(tsk) != tsk->nsproxy->pid_ns_for_children)
return -ECHILD;
+ /*
+ * Setup uptime for new containers only, if restored
+ * the value won't be zero here already but setup from
+ * cgroup write while resuming the container.
+ */
if (ve->start_time == 0) {
ve->start_time = tsk->start_time;
ve->real_start_time = tsk->real_start_time;
--
2.28.0
More information about the Devel
mailing list