Difference between revisions of "X86/TSN/two-cpu-cores"
From ESS-WIKI
(Created page with "{{DISPLAYTITLE:Configure grub.cfg for two CPU cores}} <div style="float:right; position:fixed; margin:0 1em 0 0; top:200px; right:10px; max-height: 350px; overflow: auto...") |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Configure grub.cfg for two CPU cores}} | {{DISPLAYTITLE:Configure grub.cfg for two CPU cores}} | ||
<div style="float:right; position:fixed; margin:0 1em 0 0; top:200px; right:10px; max-height: 350px; overflow: auto">__TOC__</div> | <div style="float:right; position:fixed; margin:0 1em 0 0; top:200px; right:10px; max-height: 350px; overflow: auto">__TOC__</div> | ||
− | |||
+ | == Intel Yocto Linux == | ||
+ | |||
+ | * modify grub.cfg for two cpu cores ... | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg | GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg | ||
# backup original grub.cfg if not backup before | # backup original grub.cfg if not backup before | ||
Line 21: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | * recover to the original grub.cfg ... | + | * recover to the original grub.cfg ... |
+ | <syntaxhighlight lang="bash"> | ||
GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg | GRUBCFG=/boot/efi/EFI/BOOT/grub.cfg | ||
Line 38: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | == Ubuntu with Kernel Overlay == |
Latest revision as of 10:35, 17 January 2024
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