[Devel] [PATCH RHEL COMMIT] sched: Account task_group::start_time
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Oct 4 16:34:09 MSK 2021
reverted
https://jira.sw.ru/browse/PSBM-134393
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
On 01.10.2021 19:38, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after ark-5.14
> ------>
> commit ccf05b7b60625d7da33245107480e1105cfbaf5f
> Author: Kirill Tkhai <ktkhai at virtuozzo.com>
> Date: Fri Oct 1 19:38:38 2021 +0300
>
> sched: Account task_group::start_time
>
> Extracted from "Initial patch".
>
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
>
> (cherry picked from vz7 commit bad04073f185d257f6a3290523ca02c095837e8b)
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
>
> Rebase to vz8 notes:
> * moved from struct timespec to u64 (nsec)
>
> Cherry-picked from vz8 commit e4826d8be177 ("sched: Account
> task_group::start_time"))
>
> Followed ktime_get_boot_ns() -> ktime_get_boottime_ns() rename.
>
> Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
> ---
> kernel/sched/core.c | 4 ++++
> kernel/sched/sched.h | 3 +++
> 2 files changed, 7 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index a530d3cba26d..b164cd9de057 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -9178,6 +9178,7 @@ void __init sched_init(void)
> #ifdef CONFIG_CFS_CPULIMIT
> root_task_group.topmost_limited_ancestor = &root_task_group;
> #endif
> + root_task_group.start_time = 0;
> #endif /* CONFIG_CGROUP_SCHED */
>
> for_each_possible_cpu(i) {
> @@ -9559,6 +9560,9 @@ struct task_group *sched_create_group(struct task_group *parent)
>
> alloc_uclamp_sched_group(tg, parent);
>
> + /* start_time is saved CT0 uptime */
> + tg->start_time = ktime_get_boottime_ns();
> +
> return tg;
>
> err:
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 45b2cb7203ea..0a0ef82744bf 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -430,6 +430,9 @@ struct task_group {
> struct autogroup *autogroup;
> #endif
>
> + /* Monotonic time in nsecs: */
> + u64 start_time;
> +
> struct cfs_bandwidth cfs_bandwidth;
>
> #ifdef CONFIG_UCLAMP_TASK_GROUP
> .
>
More information about the Devel
mailing list