[Devel] [PATCH RHEL8 COMMIT] kstat: fix percpu early linking

Konstantin Khorenko khorenko at virtuozzo.com
Thu May 6 00:55:02 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 44914c8ed1e5fa315cea9abe6aec2471cac45c70
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Thu May 6 00:55:02 2021 +0300

    kstat: fix percpu early linking
    
    * init kstat early as possible, before page_alloc_init() and kmem_cache_init()
    https://jira.sw.ru/browse/PSBM-36448
    
    Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
    
    Without this patch kstat_init() is useless and never called.
    
    https://jira.sw.ru/browse/PSBM-127780
    Splited-from: 02bc7ba77b34b ("core: Add glob_kstat, percpu kstat and
    account mm stat")
    Fixes: 32a31d2ad5e7f ("vzstat: Add base kstat structures and variables")
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 init/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/init/main.c b/init/main.c
index 6d1ed453617b..b4ac013a8161 100644
--- a/init/main.c
+++ b/init/main.c
@@ -95,6 +95,7 @@
 #include <linux/jump_label.h>
 #include <linux/mem_encrypt.h>
 #include <linux/veowner.h>
+#include <linux/vzstat.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -558,6 +559,7 @@ asmlinkage __visible void __init start_kernel(void)
 	setup_command_line(command_line);
 	setup_nr_cpu_ids();
 	setup_per_cpu_areas();
+	kstat_init();
 	smp_prepare_boot_cpu();	/* arch-specific boot-cpu hooks */
 	boot_cpu_hotplug_init();
 


More information about the Devel mailing list