[Devel] [PATCH RHEL8 COMMIT] sched: Uninline css_tg()
Konstantin Khorenko
khorenko at virtuozzo.com
Thu May 6 00:42:46 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.26
------>
commit 4124ec60ff4c1411f1b960268433170cf63e091c
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Thu May 6 00:42:46 2021 +0300
sched: Uninline css_tg()
Compilation with custom config fails:
kernel/ve/ve.c: In function âve_get_cpu_avenrunâ:
kernel/ve/ve.c:1679:27: error: inlining failed in call to always_inline âcss_tgâ: function body not available
inline struct task_group *css_tg(struct cgroup_subsys_state *css);
^~~~~~
kernel/ve/ve.c:1690:7: note: called from here
tg = css_tg(css);
^~~~~~~~~~~
We may remove "inline" attribute, as compiler is clever enough
to make itself inlining in kernel/sched/sched.c.
To_merge: 90368f957e01 ("ve/sched/stat: Introduce functions to calculate
vcpustat data")
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Reviewed-by: Evgenii Shatokhin <eshatokhin at virtuozzo.com>
---
kernel/sched/core.c | 2 +-
kernel/sched/cpuacct.c | 2 +-
kernel/ve/ve.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3bb7953b084e..375de135c132 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6767,7 +6767,7 @@ void sched_move_task(struct task_struct *tsk)
task_rq_unlock(rq, tsk, &rf);
}
-inline struct task_group *css_tg(struct cgroup_subsys_state *css)
+struct task_group *css_tg(struct cgroup_subsys_state *css)
{
return css ? container_of(css, struct task_group, css) : NULL;
}
diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c
index 5806d55a5260..33b6987700c2 100644
--- a/kernel/sched/cpuacct.c
+++ b/kernel/sched/cpuacct.c
@@ -376,7 +376,7 @@ struct cgroup_subsys cpuacct_cgrp_subsys = {
.early_init = true,
};
-extern inline struct task_group *css_tg(struct cgroup_subsys_state *css);
+extern struct task_group *css_tg(struct cgroup_subsys_state *css);
static struct task_group *ve_root_tg(struct task_group *tg) {
struct cgroup *cg;
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index f164e2d426a6..5bf187705f2a 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -1676,7 +1676,7 @@ int ve_show_loadavg(struct ve_struct *ve, struct seq_file *p)
return err;
}
-inline struct task_group *css_tg(struct cgroup_subsys_state *css);
+struct task_group *css_tg(struct cgroup_subsys_state *css);
int get_avenrun_tg(struct task_group *tg, unsigned long *loads,
unsigned long offset, int shift);
More information about the Devel
mailing list