函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:arch\x86\kernel\smpboot.c Create Date:2022-07-27 09:24:18
首页 Copyright©Brick

643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
static void impress_friends(void)
{
    int cpu;
    unsigned long bogosum = 0;
    /*
     * Allow the user to impress friends.
     */
    pr_debug("Before bogomips\n");
    for_each_possible_cpu(cpu)
        if (cpumask_test_cpu(cpu, cpu_callout_mask))
            bogosum += cpu_data(cpu).loops_per_jiffy;
    pr_info("Total of %d processors activated (%lu.%02lu BogoMIPS)\n",
        num_online_cpus(),
        bogosum/(500000/HZ),
        (bogosum/(5000/HZ))%100);
 
    pr_debug("Before bogocount - setting activated=1\n");
}