Configure grub.cfg for two CPU cores
From ESS-WIKI
Intel Yocto Linux
- modify grub.cfg for two cpu cores ...
GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg
# backup original grub.cfg if not backup before
[[ ! -f $GRUBCFG.bak ]] && cp -a $GRUBCFG{,.bak}
# display current setting
grep --color -E '(isolcpus|rcu_nocbs)=\S*' $GRUBCFG
# change isolcpus=* rcu_nocbs=* to change isolcpus=1-2 rcu_nocbs=1-2
sed -i "s/isolcpus=\S*/isolcpus=1-2/; s/rcu_nocbs=\S*/rcu_nocbs=1-2/" $GRUBCFG
# verification
grep --color -E '(isolcpus|rcu_nocbs)=\S*' $GRUBCFG
# if the grub.cfg is correct, reboot machine
reboot
- recover to the original grub.cfg ...
GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg
# display current setting
grep --color -E '(isolcpus|rcu_nocbs)=\S*' $GRUBCFG
# recover
[[ -f $GRUBCFG.bak ]] && cp -a $GRUBCFG.bak $GRUBCFG
# verification
grep --color -E '(isolcpus|rcu_nocbs)=\S*' $GRUBCFG
# if the grub.cfg is recovered, reboot machine
reboot