Difference between revisions of "X86/TSN/two-cpu-cores"

From ESS-WIKI
Jump to: navigation, search
(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>
* if two cpu cores ...<br /><syntaxhighlight lang="bash">
 
  
 +
== 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 ...<br /><syntaxhighlight lang="bash">
+
* 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

Ubuntu with Kernel Overlay