[rh8,4/5] ve/time: Add comment in ve_start_container() on start time initialization

Submitted by Konstantin Khorenko on Oct. 8, 2020, 3:22 p.m.

Details

Message ID 20201008152203.1173132-5-khorenko@virtuozzo.com
State New
Series "ve/time: first patchset for times virtualization in CT"
Headers show

Commit Message

Konstantin Khorenko Oct. 8, 2020, 3:22 p.m.
Fixes: e931118f8139 ("ve: Add ve cgroup and ve_hook subsys")

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 kernel/ve/ve.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

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;