Kernel Synchronization and Lock Debugging
1. Per - CPU Variables in the Kernel
1.1 Controlling Live CPUs at Runtime
In a virtual machine, if you have multiple CPUs but want only a subset to be “live” at runtime, you can pass the maxcpus=n parameter to the VM’s kernel at boot. You can check if this parameter is set by looking at /proc/cmdline . For example:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-llkd-dbg root=UUID=1c4<...> ro console=ttyS0,115200n8 console=tty0 quiet splash 3 maxcpus=2
Here, we can see that the maxcpus=2 parameter is set, meaning only two CPUs will be active at runtime.
超级会员免费看
订阅专栏 解锁全文
916

被折叠的 条评论
为什么被折叠?



