[Devel] [PATCH RHEL8 COMMIT] ve/time: Add comment in ve_start_container() on start time initialization

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 14 15:50:18 MSK 2020


The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.12
------>
commit 957f72c6b846e1d3fdf9072080fecbd10d08d5ad
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Oct 6 19:20:45 2020 +0300

    ve/time: Add comment in ve_start_container() on start time initialization
    
    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;


More information about the Devel mailing list