]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
debug timing
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 28 Jan 2021 20:50:29 +0000 (20:50 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 16 Feb 2021 13:19:36 +0000 (13:19 +0000)
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kernel/kvm.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/smpboot.c
kernel/cpu.c

index 5e78e01ca3b46f8eccfd11541850bc08a122b614..9eb0b9497855f3ebed73aba4808b5124e7c4ebba 100644 (file)
@@ -308,7 +308,7 @@ static void kvm_register_steal_time(void)
                return;
 
        wrmsrl(MSR_KVM_STEAL_TIME, (slow_virt_to_phys(st) | KVM_MSR_ENABLED));
-       pr_info("stealtime: cpu %d, msr %llx\n", cpu,
+       if (0)  pr_info("stealtime: cpu %d, msr %llx\n", cpu,
                (unsigned long long) slow_virt_to_phys(st));
 }
 
index aa593743acf679781bbfd98117bfc269f5c999b4..79a5c26c376e35308efca74bd68995db778c31fc 100644 (file)
@@ -108,7 +108,7 @@ static inline void kvm_sched_clock_init(bool stable)
        kvm_sched_clock_offset = kvm_clock_read();
        pv_ops.time.sched_clock = kvm_sched_clock_read;
 
-       pr_info("kvm-clock: using sched offset of %llu cycles",
+       if (0) pr_info("kvm-clock: using sched offset of %llu cycles",
                kvm_sched_clock_offset);
 
        BUILD_BUG_ON(sizeof(kvm_sched_clock_offset) >
@@ -184,7 +184,7 @@ static void kvm_register_clock(char *txt)
 
        pa = slow_virt_to_phys(&src->pvti) | 0x01ULL;
        wrmsrl(msr_kvm_system_time, pa);
-       pr_info("kvm-clock: cpu %d, msr %llx, %s", smp_processor_id(), pa, txt);
+       if (0)  pr_info("kvm-clock: cpu %d, msr %llx, %s", smp_processor_id(), pa, txt);
 }
 
 static void kvm_save_sched_clock_state(void)
index 6517ca40eb6fe49fb5e97f4037e16ac249a4070e..bd65ed446425fff2915539d14376a204a9b318a5 100644 (file)
@@ -373,7 +373,7 @@ int topology_update_die_map(unsigned int die, unsigned int cpu)
                goto found;
 
        new = logical_die++;
-       if (new != die) {
+       if (0 && new != die) {
                pr_info("CPU %u Converting physical %u to logical die %u\n",
                        cpu, die, new);
        }
index 11f9504b4845600cb78d47c51fc2acbe394989e4..dc2379326662ce0df05005016cf724c6b04257ff 100644 (file)
@@ -1336,6 +1336,7 @@ void bringup_nonboot_cpus(unsigned int setup_max_cpus)
 {
        unsigned int cpu;
        int n = setup_max_cpus - num_online_cpus();
+       cycles_t t1, t2;
 
        /* ∀ parallel pre-bringup state, bring N CPUs to it */
        if (n > 0) {
@@ -1344,22 +1345,29 @@ void bringup_nonboot_cpus(unsigned int setup_max_cpus)
                while (st <= CPUHP_BP_PARALLEL_DYN_END &&
                       cpuhp_hp_states[st].name) {
                        int i = n;
-
+                       t1 = get_cycles();
                        for_each_present_cpu(cpu) {
                                cpu_up(cpu, st);
                                if (!--i)
                                        break;
                        }
+                       t2 = get_cycles();
+
+                       printk("Brought %d CPUs to %s in %lld cycles\n", n - i,
+                              cpuhp_hp_states[st].name, t2 - t1);
                        st++;
                }
        }
 
+       t1 = get_cycles();
        for_each_present_cpu(cpu) {
                if (num_online_cpus() >= setup_max_cpus)
                        break;
                if (!cpu_online(cpu))
                        cpu_up(cpu, CPUHP_ONLINE);
        }
+       t2 = get_cycles();
+       printk("Brought CPUs online in %lld cycles\n", t2 - t1);
 }
 
 #ifdef CONFIG_PM_SLEEP_SMP