Tegra3采用vSMP(VariableSymmetric Multiprocessing)架构,共5个cortex-a9处理器,其中4个为高性能设计,1个为低功耗设计:

vSMP

在系统运行过程中,会根据CPU负载切换低功耗处理器和高功耗处理器:

LP-G switch in tegra3

除此之外,4个高性能ARM核心也会根据运行情况,动态借用Linux kernel支持的CPU hotplug进行CPU的UP/DOWN操作。

动态切换主处理器和Companion 处理器借用的是软硬件配套的CPU Governor 和 CPU Management Logic。

我们用华硕EeePad运行高负载,低负载应用,通过dmesg查看内核消息也确实验证了多核的热插拔以及主ARM和LP ARM之间的动态切换。

CPU hotplug记录:

<4>[104626.426957] CPU1: Booted secondary processor
<7>[104627.427412] tegra CPU: force EDP limit 720000 kHz
<4>[104627.427670] CPU2: Booted secondary processor
<4>[104628.537005] stop_machine_cpu_stop cpu=0
<4>[104628.537017] stop_machine_cpu_stop cpu=2
<4>[104628.537059] stop_machine_cpu_stop cpu=1
<4>[104628.537702] __stop_cpus: wait_for_completion_timeout+
<4>[104628.537810] __stop_cpus: smp=0 done.executed=1 done.ret =0-
<5>[104628.537960] CPU1: clean shutdown
<4>[104630.537092] stop_machine_cpu_stop cpu=0
<4>[104630.537172] stop_machine_cpu_stop cpu=2
<4>[104630.537739] __stop_cpus: wait_for_completion_timeout+
<4>[104630.538060] __stop_cpus: smp=0 done.executed=1 done.ret =0-
<5>[104630.538203] CPU2: clean shutdown
<4>[104631.306984] tegra_watchdog_touch

高性能处理器和低功耗处理器切换:

<3>[104666.799152] LP=>G: prolog 22 us, switch 2129 us, epilog 24 us, total 2175 us


<3>[104667.807273] G=>LP: prolog 18 us, switch 157 us, epilog 25 us, total 200 us


<4>[104671.407008] tegra_watchdog_touch


<4>[104671.408816] nct1008_get_temp: ret temp=35C


<3>[104671.939060] LP=>G: prolog 17 us, switch 2127 us, epilog 22 us, total 2166 us


<3>[104672.938091] G=>LP: prolog 18 us, switch 156 us, epilog 24 us, total 198 us