[Devel] [PATCH RHEL7 COMMIT] sched: Export calc_load_ve()

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jul 19 15:56:57 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.4
------>
commit 985da331d958d20d046e7e5bd7928aac752727fa
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Jul 19 15:56:57 2018 +0300

    sched: Export calc_load_ve()
    
    This will be used in next patch.
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =========================
    Patchset description:
    Make calc_load_ve() be executed out of jiffies_lock
    
    https://jira.sw.ru/browse/PSBM-84967
    
    Kirill Tkhai (3):
          sched: Make calc_global_load() return true when it's need to update ve statistic
          sched: Export calc_load_ve()
          sched: Call calc_load_ve() out of jiffies_lock
---
 include/linux/sched.h | 7 +++++++
 kernel/sched/core.c   | 6 ++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1f7c39dc436e..1e0469df2cfb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -186,6 +186,13 @@ extern atomic_t nr_dead;
 extern unsigned long nr_zombie;
 
 extern bool calc_global_load(unsigned long ticks);
+
+#ifdef CONFIG_VE
+extern void calc_load_ve(void);
+#else
+#define calc_load_ve()	do { } while (0)
+#endif
+
 extern void update_cpu_load_nohz(void);
 
 extern unsigned long get_parent_ip(unsigned long addr);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index aa5422339e3d..693823a1bd36 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2883,7 +2883,7 @@ calc_load(unsigned long load, unsigned long exp, unsigned long active)
 #ifdef CONFIG_VE
 static LIST_HEAD(ve_root_list);
 
-static void calc_load_ve(void)
+void calc_load_ve(void)
 {
 	unsigned long nr_unint, nr_active;
 	struct task_group *tg;
@@ -2924,9 +2924,7 @@ static void calc_load_ve(void)
 	CALC_LOAD(kstat_glob.nr_unint_avg[2], EXP_15, nr_unint);
 	write_seqcount_end(&kstat_glob.nr_unint_avg_seq);
 }
-#else
-#define calc_load_ve()	do { } while (0)
-#endif
+#endif /* CONFIG_VE */
 
 #ifdef CONFIG_NO_HZ_COMMON
 /*


More information about the Devel mailing list